private void OnEnable() { _target = (ContextGraph)target; _nodes = serializedObject.FindProperty("_nodes"); _edges = serializedObject.FindProperty("_edges"); _rootNode = serializedObject.FindProperty("_rootNode"); }
public static void Load(ContextGraph g) { var w = EditorWindowBase.InitWindow <EditorWindow_ContextGraph>("✪ Context Graph"); // var w = EditorWindowBase.InitWindow<EditorWindow_ContextGraph>("◉ Context Graph"); w._currentGraph = g; }
public IJsonApiContext ApplyContext <T>(object controller) { if (controller == null) { throw new JsonApiException(500, $"Cannot ApplyContext from null controller for type {typeof(T)}"); } ControllerType = controller.GetType(); var context = _httpContextAccessor.HttpContext; var path = context.Request.Path.Value.Split('/'); RequestEntity = ContextGraph.GetContextEntity(typeof(T)); if (context.Request.Query.Any()) { QuerySet = new QuerySet(this, context.Request.Query); IncludedRelationships = QuerySet.IncludedRelationships; } var linkBuilder = new LinkBuilder(this); BasePath = linkBuilder.GetBasePath(context, RequestEntity.EntityName); PageManager = GetPageManager(); IsRelationshipPath = path[path.Length - 2] == "relationships"; return(this); }
public IContextGraph Build() { // this must be done at build so that call order doesn't matter _entities.ForEach(e => e.Links = GetLinkFlags(e.EntityType)); var graph = new ContextGraph(_entities, _usesDbContext, _validationResults); return(graph); }
public IContextGraph Build() { var graph = new ContextGraph() { Entities = _entities, UsesDbContext = _usesDbContext }; return(graph); }
public IContextGraph Build() { // this must be done at build so that call order doesn't matter _entities.ForEach(e => e.Links = GetLinkFlags(e.EntityType)); var graph = new ContextGraph() { Entities = _entities, UsesDbContext = _usesDbContext }; return(graph); }
public IJsonApiContext ApplyContext <T>() { var context = _httpContextAccessor.HttpContext; RequestEntity = ContextGraph.GetContextEntity(typeof(T)); if (context.Request.Query.Any()) { QuerySet = new QuerySet(this, context.Request.Query); IncludedRelationships = QuerySet.IncludedRelationships; } var linkBuilder = new LinkBuilder(this); BasePath = linkBuilder.GetBasePath(context, RequestEntity.EntityName); return(this); }
public IJsonApiContext ApplyContext <T>() { var context = _httpContextAccessor.HttpContext; var path = context.Request.Path.Value.Split('/'); RequestEntity = ContextGraph.GetContextEntity(typeof(T)); if (context.Request.Query.Any()) { QuerySet = new QuerySet(this, context.Request.Query); IncludedRelationships = QuerySet.IncludedRelationships; } var linkBuilder = new LinkBuilder(this); BasePath = linkBuilder.GetBasePath(context, RequestEntity.EntityName); PageManager = GetPageManager(); IsRelationshipPath = path[path.Length - 2] == "relationships"; return(this); }
public ContextGraph(GraphContext parent, ContextGraph other) : base(other, true) { this.Parent = parent; }