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); }
internal RemoteBinaryPropertyDefinition(ServiceBinaryPropertyDefinition myServiceBinaryPropertyDefinition, IServiceToken myServiceToken) { this._ServiceToken = myServiceToken; this.ID = myServiceBinaryPropertyDefinition.ID; this.Name = myServiceBinaryPropertyDefinition.Name; this.IsUserDefined = myServiceBinaryPropertyDefinition.IsUserDefined; this.RelatedType = ConvertHelper.ToBaseType(myServiceBinaryPropertyDefinition.RelatedType, myServiceToken); }