(self, data, options=None, **kwargs)
Return instance of class based on Roslyn type property

        Data keys handled here:

            type
                Set the object class

            items
                Recurse into :py:meth:`create_class` to create child object
                instances

        :param data: dictionary data from Roslyn output artifact
Return instance of class based on Roslyn type property
Return instance of class based on Roslyn type property
def create_class(self, data, options=None, **kwargs):
        """
        Return instance of class based on Roslyn type property

        Data keys handled here:

            type
                Set the object class

            items
                Recurse into :py:meth:`create_class` to create child object
                instances

        :param data: dictionary data from Roslyn output artifact
        """
        kwargs.pop("path", None)
        obj_map = {cls.type: cls for cls in ALL_CLASSES}
        try:
            cls = obj_map[data["type"].lower()]
        except KeyError:
            # this warning intentionally has no (sub-)type
            LOGGER.warning("Unknown type: %s" % data)
        else:
            obj = cls(
                data, jinja_env=self.jinja_env, app=self.app, options=options, **kwargs
            )
            obj.url_root = self.url_root

            # Append child objects
            # TODO this should recurse in the case we're getting back more
            # complex argument listings

            yield obj
def create_class ( self , data , options = None , * * kwargs ) : kwargs . pop ( "path" , None ) obj_map = { cls . type : cls for cls in ALL_CLASSES } try : cls = obj_map [ data [ "type" ] . lower ( ) ] except KeyError : # this warning intentionally has no (sub-)type LOGGER . warning ( "Unknown type: %s" % data ) else : obj = cls ( data , jinja_env = self . jinja_env , app = self . app , options = options , * * kwargs ) obj . url_root = self . url_root # Append child objects # TODO this should recurse in the case we're getting back more # complex argument listings yield obj