public ServiceIncomingEdgeDefinition(IIncomingEdgeDefinition myIncomingEdgeDefinition)
     : base(myIncomingEdgeDefinition)
 {
     if (myIncomingEdgeDefinition != null)
     {
         this.RelatedEdgeDefinition = new ServiceOutgoingEdgeDefinition(myIncomingEdgeDefinition.RelatedEdgeDefinition);
     }
 }
Exemple #2
0
 public static ServiceAttributeDefinition ToServiceAttributeDefinition(IAttributeDefinition myAttributeDefinition)
 {
     ServiceAttributeDefinition svcAttributeDef = null;
     if (myAttributeDefinition != null)
     {
         switch (myAttributeDefinition.Kind)
         {
             case AttributeType.Property:
                 svcAttributeDef = new ServicePropertyDefinition((IPropertyDefinition)myAttributeDefinition);
                 break;
             case AttributeType.OutgoingEdge:
                 svcAttributeDef = new ServiceOutgoingEdgeDefinition((IOutgoingEdgeDefinition)myAttributeDefinition);
                 break;
             case AttributeType.IncomingEdge:
                 svcAttributeDef = new ServiceIncomingEdgeDefinition((IIncomingEdgeDefinition)myAttributeDefinition);
                 break;
             case AttributeType.BinaryProperty:
                 svcAttributeDef = new ServiceBinaryPropertyDefinition((IBinaryPropertyDefinition)myAttributeDefinition);
                 break;
         }
     }
     return svcAttributeDef;
 }