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


C# ISession.Instantiate方法代码示例

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


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

示例1: AppsFindOrCreateAsDependable

        public static StoreRevenue AppsFindOrCreateAsDependable(ISession session, SalesInvoice invoice)
        {
            var storeRevenues = invoice.Store.StoreRevenuesWhereStore;
            storeRevenues.Filter.AddEquals(Meta.InternalOrganisation, invoice.BilledFromInternalOrganisation);
            storeRevenues.Filter.AddEquals(Meta.Year, invoice.InvoiceDate.Year);
            storeRevenues.Filter.AddEquals(Meta.Month, invoice.InvoiceDate.Month);
            var storeRevenue = storeRevenues.First ?? new StoreRevenueBuilder(session)
                                                            .WithInternalOrganisation(invoice.BilledFromInternalOrganisation)
                                                            .WithStore((Store)session.Instantiate(invoice.Store))
                                                            .WithYear(invoice.InvoiceDate.Year)
                                                            .WithMonth(invoice.InvoiceDate.Month)
                                                            .WithCurrency(invoice.BilledFromInternalOrganisation.PreferredCurrency)
                                                            .WithRevenue(0M)
                                                            .Build();

            InternalOrganisationRevenues.AppsFindOrCreateAsDependable(session, storeRevenue);

            return storeRevenue;
        }
开发者ID:Allors,项目名称:apps,代码行数:19,代码来源:StoreRevenues.cs

示例2: AppsFindOrCreateAsDependable

        public static SalesChannelRevenue AppsFindOrCreateAsDependable(ISession session, SalesInvoice invoice)
        {
            SalesChannelRevenue salesChannelRevenue = null;
            if (invoice.ExistSalesChannel)
            {
                var salesChannelRevenues = invoice.SalesChannel.SalesChannelRevenuesWhereSalesChannel;
                salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.InternalOrganisation, invoice.BilledFromInternalOrganisation);
                salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.Year, invoice.InvoiceDate.Year);
                salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.Month, invoice.InvoiceDate.Month);
                salesChannelRevenue = salesChannelRevenues.First ?? new SalesChannelRevenueBuilder(session)
                                                                            .WithInternalOrganisation(invoice.BilledFromInternalOrganisation)
                                                                            .WithSalesChannel((SalesChannel)session.Instantiate(invoice.SalesChannel))
                                                                            .WithYear(invoice.InvoiceDate.Year)
                                                                            .WithMonth(invoice.InvoiceDate.Month)
                                                                            .WithCurrency(invoice.BilledFromInternalOrganisation.PreferredCurrency)
                                                                            .WithRevenue(0M)
                                                                            .Build();
            }

            return salesChannelRevenue;
        }
开发者ID:Allors,项目名称:apps,代码行数:21,代码来源:SalesChannelRevenues.cs

示例3: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.contact = (Person)session.Instantiate(this.contact);
     this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship);
 }
开发者ID:Allors,项目名称:apps,代码行数:5,代码来源:OrganisationContactRelationshipTests.cs

示例4: Instantiate

 public static GT32UnitLT32Composite[] Instantiate(ISession session, string[] ids)
 {
     return (GT32UnitLT32Composite[])session.Instantiate(ids);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:GT32UnitLT32Composite.cs

示例5: Instantiate

 public static Sandbox[] Instantiate(ISession session, string[] ids)
 {
     return (Sandbox[])session.Instantiate(ids);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:Sandbox.cs

示例6: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.contact = (Person)session.Instantiate(this.contact);
     this.supplier = (Organisation)session.Instantiate(this.supplier);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.supplierRelationship = (SupplierRelationship)session.Instantiate(this.supplierRelationship);
 }
开发者ID:Allors,项目名称:apps,代码行数:7,代码来源:SupplierRelationshipTests.cs

示例7: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.employee = (Person)session.Instantiate(this.employee);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.employment = (Employment)session.Instantiate(this.employment);
 }
开发者ID:Allors,项目名称:apps,代码行数:6,代码来源:EmploymentTests.cs

示例8: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.ownBankAccount = (OwnBankAccount)session.Instantiate(this.ownBankAccount);
     this.euro = (Currency)session.Instantiate(this.euro);
     this.billingAddress = (PartyContactMechanism)session.Instantiate(this.billingAddress);
 }
开发者ID:Allors,项目名称:apps,代码行数:6,代码来源:InternalOrganisationTests.cs

示例9: Instantiate

 public static ClassWithoutUnitRoles[] Instantiate(ISession session, string[] ids)
 {
     return (ClassWithoutUnitRoles[])session.Instantiate(ids);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:ClassWithoutUnitRoles.cs

示例10: Instantiate

 public static SingleUnit[] Instantiate(ISession session, string[] ids)
 {
     return (SingleUnit[])session.Instantiate(ids);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:SingleUnit.cs

示例11: GetUser

 public User GetUser(ISession session)
 {
     return (User)session.Instantiate(this.objectId);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:Users.cs

示例12: Instantiate

 public static C1[] Instantiate(ISession session, string[] ids)
 {
     return (C1[])session.Instantiate(ids);
 }
开发者ID:whesius,项目名称:allors,代码行数:4,代码来源:C1.cs

示例13: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.finishedGood = (FinishedGood)session.Instantiate(this.finishedGood);
     this.currentPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.currentPurchasePrice);
     this.order = (PurchaseOrder)session.Instantiate(this.order);
     this.supplier = (Organisation)session.Instantiate(this.supplier);
 }
开发者ID:Allors,项目名称:apps,代码行数:7,代码来源:PurchaseOrderItemTests.cs

示例14: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.good = (Good)session.Instantiate(this.good);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.billToCustomer = (Organisation)session.Instantiate(this.billToCustomer);
 }
开发者ID:Allors,项目名称:apps,代码行数:6,代码来源:ReceiptTests.cs

示例15: InstantiateObjects

 private void InstantiateObjects(ISession session)
 {
     this.productCategory = (ProductCategory)session.Instantiate(this.productCategory);
     this.parentProductCategory = (ProductCategory)session.Instantiate(this.parentProductCategory);
     this.ancestorProductCategory = (ProductCategory)session.Instantiate(this.ancestorProductCategory);
     this.part = (FinishedGood)session.Instantiate(this.part);
     this.good = (Good)session.Instantiate(this.good);
     this.feature1 = (Colour)session.Instantiate(this.feature1);
     this.feature2 = (Colour)session.Instantiate(this.feature2);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.shipToCustomer = (Organisation)session.Instantiate(this.shipToCustomer);
     this.billToCustomer = (Organisation)session.Instantiate(this.billToCustomer);
     this.supplier = (Organisation)session.Instantiate(this.supplier);
     this.kiev = (City)session.Instantiate(this.kiev);
     this.shipToContactMechanismMechelen = (PostalAddress)session.Instantiate(this.shipToContactMechanismMechelen);
     this.shipToContactMechanismKiev = (PostalAddress)session.Instantiate(this.shipToContactMechanismKiev);
     this.currentBasePriceGeoBoundary = (BasePrice)session.Instantiate(this.currentBasePriceGeoBoundary);
     this.currentGoodBasePrice = (BasePrice)session.Instantiate(this.currentGoodBasePrice);
     this.currentGood1Feature1BasePrice = (BasePrice)session.Instantiate(this.currentGood1Feature1BasePrice);
     this.currentFeature2BasePrice = (BasePrice)session.Instantiate(this.currentFeature2BasePrice);
     this.goodPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.goodPurchasePrice);
     this.virtualGoodPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.virtualGoodPurchasePrice);
     this.currentGoodBasePrice = (BasePrice)session.Instantiate(this.currentGoodBasePrice);
     this.goodSupplierOffering = (SupplierOffering)session.Instantiate(this.goodSupplierOffering);
     this.virtualgoodSupplierOffering = (SupplierOffering)session.Instantiate(this.virtualgoodSupplierOffering);
     this.order = (SalesOrder)session.Instantiate(this.order);
     this.vatRate21 = (VatRate)session.Instantiate(this.vatRate21);
 }
开发者ID:Allors,项目名称:apps,代码行数:28,代码来源:SalesOrderItemTests.cs


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