Beispiel #1
0
        public NodeStatement(Id id, IImmutableDictionary<Id, Id> attributes)
            : base(attributes)
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }

            this.id = id;
        }
Beispiel #2
0
        public NodeId(Id id, Port port = null)
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }

            this.id = id;
            this.port = port;
        }
Beispiel #3
0
        public Port(Id id, CompassPoints? compassPoint)
        {
            if (id == null && compassPoint == null)
            {
                throw new ArgumentException("A port must specify either an ID, a compass point, or both.");
            }

            this.id = id;
            this.compassPoint = compassPoint;
        }
Beispiel #4
0
        public Graph(GraphKinds graphKind, Id name, IImmutableList<Statement> statements)
        {
            if (statements == null)
            {
                throw new ArgumentNullException("statements");
            }

            this.graphKind = graphKind;
            this.name = name;
            this.statements = statements;
        }
 public AttributeStatement Set(Id key, Id value)
 {
     return new AttributeStatement(attributeKind, Attributes.Add(key, value));
 }
Beispiel #6
0
 public NodeStatement Set(Id key, Id value)
 {
     return new NodeStatement(id, Attributes.Add(key, value));
 }
Beispiel #7
0
 public static NodeStatement For(Id id)
 {
     return new NodeStatement(id, ImmutableDictionary<Id, Id>.Empty);
 }
Beispiel #8
0
 public Graph Named(Id name)
 {
     return new Graph(graphKind, name, statements);
 }
Beispiel #9
0
 public EdgeStatement Set(Id key, Id value)
 {
     return new EdgeStatement(fromId, toId, Attributes.Add(key, value));
 }