コード例 #1
0
		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));
		}
コード例 #2
0
        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);
            }
        }
コード例 #3
0
		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;
		}
コード例 #4
0
		private DataContractCollection CreateDataContractCollection(string name)
		{
			DataContractCollection dataContract = new DataContractCollection(DataContractStore);
			dataContract.Name = name;
			return dataContract;
		}
コード例 #5
0
		/// <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)
		{
		}
コード例 #6
0
		public static void SetDataContract(DataContractCollection element, DataContractBase newDataContractBase)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, DataContractCollectionDomainRoleId, newDataContractBase);
		}
コード例 #7
0
		public static DataContractBase GetDataContract(DataContractCollection element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, DataContractCollectionDomainRoleId) as DataContractBase;
		}