Ejemplo n.º 1
0
 public static void AddRelation(this BasePenguin self, PenguinRelationshipDirection direction, string relationName, List <long> id)
 {
     id.ForEach(i =>
     {
         var basePenguinRelationship = new BasePenguinRelationship(direction, new RelationDatastore(relationName), i);
         self.DirtyDatastore.Relations.CreateOrAddToList(relationName, basePenguinRelationship);
     });
 }
Ejemplo n.º 2
0
 public BasePenguinRelationship(PenguinRelationshipDirection direction, RelationDatastore datastore, long target) : this(direction, datastore)
 {
     this.Target = new PenguinReference(target);
 }
Ejemplo n.º 3
0
 public BasePenguinRelationship(PenguinRelationshipDirection direction, RelationDatastore datastore) : this(datastore.RelationName)
 {
     this.Direction = direction;
     this.Datastore = datastore;
 }
Ejemplo n.º 4
0
 public BasePenguinRelationship(string relationName, PenguinRelationshipDirection direction, long target) : this(relationName)
 {
     this.Direction = direction;
     this.Target    = new PenguinReference(target);
 }
Ejemplo n.º 5
0
 public static void AddRelation(this BasePenguin self, PenguinRelationshipDirection direction, string relationName, long id)
 {
     self.AddRelation(direction, relationName, new List <long> {
         id
     });
 }