public static IModel Create( [NotNull] ISequenceProvider sequenceProvider, [CanBeNull] IEnumerable <IModelRuleProvider> modelRuleProviders = null, [CanBeNull] IEqualityComparer <object> nodePayloadEqualityComparer = null, [CanBeNull] IEqualityComparer <object> relationshipPayloadEqualityComparer = null) { var payloadToModelNodeMap = ImmutableDictionary <object, IModelNode> .Empty; if (nodePayloadEqualityComparer != null) { payloadToModelNodeMap = payloadToModelNodeMap.WithComparers(nodePayloadEqualityComparer); } var payloadToModelRelationshipMap = ImmutableDictionary <object, IModelRelationship> .Empty; if (relationshipPayloadEqualityComparer != null) { payloadToModelRelationshipMap = payloadToModelRelationshipMap.WithComparers(relationshipPayloadEqualityComparer); } return(new Model( ModelGraph.Empty(allowParallelEdges: false), payloadToModelNodeMap, payloadToModelRelationshipMap, sequenceProvider, modelRuleProviders, nodePayloadEqualityComparer, relationshipPayloadEqualityComparer)); }
public static IModel Create([NotNull] params IModelRuleProvider[] modelRuleProviders) { return(new Model(ModelGraph.Empty(allowParallelEdges: false), modelRuleProviders)); }