public void ShouldReturnAsmxDataContractCollectionArtifactLink() { DataContractCollection dcCollection = new DataContractCollection(Store); dcCollection.DataContractModel = new DataContractModel(Store); AsmxDataContractCollection asmxDCCollection = new AsmxDataContractCollection(); asmxDCCollection.ModelElement = dcCollection; Assert.IsInstanceOfType(asmxDCCollection.ArtifactLink, typeof(AsmxDataContractCollectionLink)); }
public override void ElementAdded(ElementAddedEventArgs e) { DataContractCollection dataContractCollection = e.ModelElement as DataContractCollection; DataContractModel root = dataContractCollection.DataContractModel; if (root != null && root.ImplementationTechnology != null) { ExtensionProviderHelper.AttachObjectExtender(dataContractCollection, root.ImplementationTechnology); } }
private DataContractCollection CreateDefaultDataContractCollectionElement(Type collectionType) { DataContractCollection rootElement = new DataContractCollection(Store); rootElement.DataContractModel = new DataContractModel(Store); rootElement.DataContractModel.ProjectMappingTable = "WCF"; rootElement.Name = ElementName; rootElement.Namespace = ElementNamespace; rootElement.ObjectExtender = AttachDataContractCollectionExtender(rootElement, collectionType); DataContract dce = new DataContract(Store); dce.Name = PrimitiveDataElementName1; rootElement.DataContract = dce; return rootElement; }
private DataContractCollection CreateDataContractCollection(string name) { DataContractCollection dataContract = new DataContractCollection(DataContractStore); dataContract.Name = name; return dataContract; }
/// <summary> /// Constructor /// Creates a DataContractBaseIsBeingReferenceOnDataContractCollections link in the same Partition as the given DataContractBase /// </summary> /// <param name="source">DataContractBase to use as the source of the relationship.</param> /// <param name="target">DataContractCollection to use as the target of the relationship.</param> public DataContractBaseIsBeingReferenceOnDataContractCollections(DataContractBase source, DataContractCollection target) : base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(DataContractBaseIsBeingReferenceOnDataContractCollections.DataContractBaseDomainRoleId, source), new DslModeling::RoleAssignment(DataContractBaseIsBeingReferenceOnDataContractCollections.DataContractCollectionDomainRoleId, target)}, null) { }
public static void SetDataContract(DataContractCollection element, DataContractBase newDataContractBase) { DslModeling::DomainRoleInfo.SetLinkedElement(element, DataContractCollectionDomainRoleId, newDataContractBase); }
public static DataContractBase GetDataContract(DataContractCollection element) { return DslModeling::DomainRoleInfo.GetLinkedElement(element, DataContractCollectionDomainRoleId) as DataContractBase; }