コード例 #1
0
 public void Add(ISubgraph subgraph)
 {
     Nodes.UnionWith(subgraph.Nodes);
     Relationships.UnionWith(subgraph.Relationships);
     // options:
     // use SourceNode from new Subgraph
     // keep original SourceNode
     // validate both same (& throw if not)
     // set to null if different
     SourceNode = subgraph.SourceNode;
 }
        public ValidateAndRepairContext(
            ContentItem contentItem,
            IContentManager contentManager,
            IContentItemVersion contentItemVersion,
            ISubgraph nodeWithRelationships,
            ISyncNameProvider syncNameProvider,
            IGraphValidationHelper graphValidationHelper,
            IValidateAndRepairGraph validateAndRepairGraph,
            ILogger logger)
            : base(contentItem, syncNameProvider, contentManager, contentItemVersion, logger)
        {
            ContentItemVersion     = contentItemVersion;
            NodeWithRelationships  = nodeWithRelationships;
            GraphValidationHelper  = graphValidationHelper;
            ValidateAndRepairGraph = validateAndRepairGraph;

            ExpectedRelationshipCounts = new Dictionary <string, int>();
        }
        public ValidateAndRepairItemSyncContext(
            ContentItem contentItem,
            IContentManager contentManager,
            IContentItemVersion contentItemVersion,
            ISubgraph nodeWithRelationships,
            ISyncNameProvider syncNameProvider,
            IGraphValidationHelper graphValidationHelper,
            IValidateAndRepairGraph validateAndRepairGraph,
            ContentTypeDefinition contentTypeDefinition,
            object nodeId,
            IServiceProvider serviceProvider)

            : base(contentItem, contentManager, contentItemVersion, nodeWithRelationships,
                   syncNameProvider, graphValidationHelper, validateAndRepairGraph,
                   serviceProvider.GetRequiredService <ILogger <ValidateAndRepairItemSyncContext> >())
        {
            ContentTypeDefinition = contentTypeDefinition;
            NodeId = nodeId;
        }
コード例 #4
0
ファイル: SubgraphControl.cs プロジェクト: babcca/BoBox.Debug
 public SubgraphControl(ISubgraph subgraph)
     : base((IVertex) subgraph)
 {
     Graph = subgraph;
     Label = string.Format("subgraph {0}", Vertex.VertexId.ToString());
 }