当前位置: 首页>>代码示例>>C#>>正文


C# Store.GetDomainModel方法代码示例

本文整理汇总了C#中Store.GetDomainModel方法的典型用法代码示例。如果您正苦于以下问题:C# Store.GetDomainModel方法的具体用法?C# Store.GetDomainModel怎么用?C# Store.GetDomainModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Store的用法示例。


在下文中一共展示了Store.GetDomainModel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateServiceContractModel

		private ServiceContract CreateServiceContractModel()
		{
			scStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));
			scDomainModel = scStore.GetDomainModel<ServiceContractDslDomainModel>();
			scTransaction = scStore.TransactionManager.BeginTransaction();

			scModel = (ServiceContractModel)scDomainModel.CreateElement(new Partition(scStore), typeof(ServiceContractModel), null);
			scModel.ImplementationTechnology = new ServiceContractWCFExtensionProvider();
			scModel.ProjectMappingTable = projectMappingTableName;

			ServiceContract sc = scStore.ElementFactory.CreateElement(ServiceContract.DomainClassId) as ServiceContract;
			sc.Name = serviceContractName;

			scModel.ServiceContracts.Add(sc);
			return sc;
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:16,代码来源:ServiceAndServiceImplementationTechnologyCrossModelValidatorFixture.cs

示例2: TestInitialize

        public void TestInitialize()
        {
            serviceProvider = new MockMappingServiceProvider();

			attributes = new NameValueCollection();
			attributes.Add("elementNameProperty", "Name");

            #region Data Contract
            dcStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(DataContractDslDomainModel));
            dcDomainModel = dcStore.GetDomainModel<DataContractDslDomainModel>();
            dcTransaction = dcStore.TransactionManager.BeginTransaction();
            dcModel = (DataContractModel)dcDomainModel.CreateElement(new Partition(dcStore), typeof(DataContractModel), null);
            dcModel.ProjectMappingTable = projectMappingTableName;
            dc = dcStore.ElementFactory.CreateElement(DataContract.DomainClassId) as DataContract;
			primitiveDataElement = dcStore.ElementFactory.CreateElement(PrimitiveDataType.DomainClassId) as PrimitiveDataType;
            primitiveDataElement.Name = primitiveDataElementName;
			dc.DataMembers.Add(primitiveDataElement);
			dcModel.Contracts.Add(dc);
            #endregion

			#region Service Contract
			scStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));
			scDomainModel = scStore.GetDomainModel<ServiceContractDslDomainModel>();
			scTransaction = scStore.TransactionManager.BeginTransaction();
			scModel = (ServiceContractModel)scDomainModel.CreateElement(new Partition(scStore), typeof(ServiceContractModel), null);
			scModel.ProjectMappingTable = projectMappingTableName;
			msg = scStore.ElementFactory.CreateElement(Message.DomainClassId) as Message;
			msg.Name = messageName;

            //Create the moniker
            //mel://[DSLNAMESPACE]\[MODELELEMENTTYPE]\[MODELELEMENT.GUID]@[PROJECT]\[MODELFILE]
            string requestMoniker = string.Format(@"mel://{0}\{1}\{2}@{3}\{4}",
                primitiveDataElement.GetType().Namespace,
                primitiveDataElement.GetType().Name,
                primitiveDataElement.Id.ToString(),
                dataContractModelProjectName, dataContractModelFileName);

			part = scStore.ElementFactory.CreateElement(DataContractMessagePart.DomainClassId) as DataContractMessagePart;
			part.Name = partName;
            part.Type = new MockModelBusReference(primitiveDataElement);
			
            msg.MessageParts.Add(part);
			scModel.Messages.Add(msg);
            #endregion
        }
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:45,代码来源:ImplementationTechnologyAndSerializerCrossModelValidatorFixture.cs

示例3: TestInitialize

        public void TestInitialize()
        {
            serviceProvider = new MockMappingServiceProvider();

			scStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));			
			scDomainModel = scStore.GetDomainModel<ServiceContractDslDomainModel>();
			scTransaction = scStore.TransactionManager.BeginTransaction();

			scModel = (ServiceContractModel)scDomainModel.CreateElement(new Partition(scStore), typeof(ServiceContractModel), null);
			scModel.ImplementationTechnology = new ServiceContractWCFExtensionProvider();
			scModel.ProjectMappingTable = projectMappingTableName;

			ServiceContract sc = scStore.ElementFactory.CreateElement(ServiceContract.DomainClassId) as ServiceContract;
			sc.Name = serviceContractName;

			scModel.ServiceContracts.Add(sc);

			hdStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(HostDesignerDomainModel));
			hdDomainModel = hdStore.GetDomainModel<HostDesignerDomainModel>();
            hdTransaction = hdStore.TransactionManager.BeginTransaction();
			hdModel = (HostDesignerModel)hdDomainModel.CreateElement(new Partition(hdStore), typeof(HostDesignerModel), null);

			HostApplication app = (HostApplication)hdStore.ElementFactory.CreateElement(HostApplication.DomainClassId);

			app.ImplementationTechnology = new HostDesignerWcfExtensionProvider();

			reference = (ServiceReference)hdStore.ElementFactory.CreateElement(ServiceReference.DomainClassId);

			//mel://[DSLNAMESPACE]\[MODELELEMENTTYPE]\[MODELELEMENT.GUID]@[PROJECT]\[MODELFILE]
			string serviceMoniker = string.Format(@"mel://{0}\{1}\{2}@{3}\{4}",
				sc.GetType().Namespace,
				serviceContractName,
				sc.Id.ToString(),
				serviceContractModelProjectName, serviceContractModelFileName);

			reference.Name = serviceMelReferenceName;
            reference.ServiceImplementationType = new MockModelBusReference(sc);

			app.ServiceDescriptions.Add(reference);

			// Initialize validator's config
            attributes = new NameValueCollection();
            attributes.Add("elementNameProperty", "Name");
        }
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:44,代码来源:CrossSCModelTIandPTMValidatorFixture.cs

示例4: TestInitialize

        public void TestInitialize()
        {
            serviceProvider = new MockMappingServiceProvider();

			attributes = new NameValueCollection();
			attributes.Add("elementNameProperty", "Name");

            #region Data Contract
            dcStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(DataContractDslDomainModel));
            dcDomainModel = dcStore.GetDomainModel<DataContractDslDomainModel>();
            dcTransaction = dcStore.TransactionManager.BeginTransaction();
            dcModel = (DataContractModel)dcDomainModel.CreateElement(new Partition(dcStore), typeof(DataContractModel), null);
            dcModel.ProjectMappingTable = projectMappingTableName;
            fc = dcStore.ElementFactory.CreateElement(FaultContract.DomainClassId) as FaultContract;
            fc.Name = faultContractName;
			dcModel.Contracts.Add(fc);
            #endregion

			#region Service Contract
			scStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));
			scDomainModel = scStore.GetDomainModel<ServiceContractDslDomainModel>();
			scTransaction = scStore.TransactionManager.BeginTransaction();
			scModel = (ServiceContractModel)scDomainModel.CreateElement(new Partition(scStore), typeof(ServiceContractModel), null);
			scModel.ProjectMappingTable = projectMappingTableName;
            operation = scStore.ElementFactory.CreateElement(Operation.DomainClassId) as Operation;
            operation.Name = operationName;

            //Create the moniker
            //mel://[DSLNAMESPACE]\[MODELELEMENTTYPE]\[MODELELEMENT.GUID]@[PROJECT]\[MODELFILE]
            string requestMoniker = string.Format(@"mel://{0}\{1}\{2}@{3}\{4}",
                fc.GetType().Namespace,
                fc.GetType().Name,
                fc.Id.ToString(),
                dataContractModelProjectName, dataContractModelFileName);

            dcfault = scStore.ElementFactory.CreateElement(DataContractFault.DomainClassId) as DataContractFault;
			dcfault.Name = dcfaultName;
            dcfault.Type = new MockModelBusReference(fc);
            
            operation.Faults.Add(dcfault);
			scModel.Operations.Add(operation);
            #endregion
        }
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:43,代码来源:FaultCollectionCrossModelValidatorFixture.cs

示例5: CreateHostDesignerModel

		private void CreateHostDesignerModel(ServiceContract sc)
		{
			hdStore = new Store(serviceProvider, typeof(CoreDesignSurfaceDomainModel), typeof(HostDesignerDomainModel));
			hdDomainModel = hdStore.GetDomainModel<HostDesignerDomainModel>();
			hdTransaction = hdStore.TransactionManager.BeginTransaction();
			hdModel = (HostDesignerModel)hdDomainModel.CreateElement(new Partition(hdStore), typeof(HostDesignerModel), null);

			HostApplication app = (HostApplication)hdStore.ElementFactory.CreateElement(HostApplication.DomainClassId);

			app.ImplementationTechnology = new HostDesignerWcfExtensionProvider();

			reference = (ServiceReference)hdStore.ElementFactory.CreateElement(ServiceReference.DomainClassId);

			//mel://[DSLNAMESPACE]\[MODELELEMENTTYPE]\[MODELELEMENT.GUID]@[PROJECT]\[MODELFILE]
			string serviceMoniker = string.Format(@"mel://{0}\{1}\{2}@{3}\{4}",
				sc.GetType().Namespace,
				serviceContractName,
				sc.Id.ToString(),
				serviceContractModelProjectName, serviceContractModelFileName);

			reference.Name = serviceMelReferenceName;
            reference.ServiceImplementationType = new MockModelBusReference(sc);

			app.ServiceDescriptions.Add(reference);
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:25,代码来源:ServiceAndServiceImplementationTechnologyCrossModelValidatorFixture.cs


注:本文中的Store.GetDomainModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。