• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IMerchelloContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IMerchelloContext的典型用法代码示例。如果您正苦于以下问题:C# IMerchelloContext类的具体用法?C# IMerchelloContext怎么用?C# IMerchelloContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IMerchelloContext类属于命名空间,在下文中一共展示了IMerchelloContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CheckoutRenderControllerBase

 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutRenderControllerBase"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 protected CheckoutRenderControllerBase(IMerchelloContext merchelloContext)
 {
     Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
     _storeSettingService = merchelloContext.Services.StoreSettingService;
     _gatewayContext = merchelloContext.Gateways;
     this.Initialize();
 }
开发者ID:ProNotion,项目名称:Merchello,代码行数:13,代码来源:CheckoutRenderControllerBase.cs


示例2: OrderApiController

 /// <summary>
 /// Initializes a new instance of the <see cref="OrderApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="umbracoContext">
 /// The umbraco context.
 /// </param>
 internal OrderApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
     : base(merchelloContext, umbracoContext)
 {
     _orderService = merchelloContext.Services.OrderService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _merchello = new MerchelloHelper(merchelloContext.Services);
 }
开发者ID:ProNotion,项目名称:Merchello,代码行数:16,代码来源:OrderApiController.cs


示例3: ExportOrdersReportApiController

        /// <summary>
        /// Initializes a new instance of the <see cref="ExportOrdersReportApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        public ExportOrdersReportApiController(IMerchelloContext merchelloContext)
            : base(merchelloContext)
        {
            _invoiceService = merchelloContext.Services.InvoiceService;

            _merchello = new MerchelloHelper(merchelloContext.Services);
        }
开发者ID:GaryLProthero,项目名称:Merchello,代码行数:13,代码来源:ExportOrdersReportApiController.cs


示例4: NoteApiController

 /// <summary>
 /// Initializes a new instance of the <see cref="NoteApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public NoteApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
     _noteService = merchelloContext.Services.NoteService;
     _merchelloHelper = new MerchelloHelper(merchelloContext.Services);
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:13,代码来源:NoteApiController.cs


示例5: ShippingGatewayApiController

        /// <summary>
        /// Initializes a new instance of the <see cref="ShippingGatewayApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        public ShippingGatewayApiController(IMerchelloContext merchelloContext)
            : base(merchelloContext)
        {
            _shippingContext = MerchelloContext.Gateways.Shipping;

            _shipCountryService = ((ServiceContext)MerchelloContext.Services).ShipCountryService;
        }
开发者ID:arknu,项目名称:Merchello,代码行数:13,代码来源:ShippingGatewayApiController.cs


示例6: RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask

 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="order">
 /// The order.
 /// </param>
 /// <param name="keysToShip">
 /// The keys to ship.
 /// </param>
 public RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask(IMerchelloContext merchelloContext, IOrder order, IEnumerable<Guid> keysToShip) 
     : base(merchelloContext, order, keysToShip)
 {
     _productVariantService = MerchelloContext.Services.ProductVariantService;
     _shipmentService = MerchelloContext.Services.ShipmentService;
     _orderService = MerchelloContext.Services.OrderService;
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:19,代码来源:RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask.cs


示例7: BraintreePaymentMethodApiService

        /// <summary>
        /// Initializes a new instance of the <see cref="BraintreePaymentMethodApiService"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="settings">
        /// The settings.
        /// </param>
        /// <param name="customerApiService">
        /// The customer api provider.
        /// </param>
        internal BraintreePaymentMethodApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings, IBraintreeCustomerApiService customerApiService)
            : base(merchelloContext, settings)
        {
            Mandate.ParameterNotNull(customerApiService, "customerApiProvider");

            _braintreeCustomerApiService = customerApiService;
        }
开发者ID:GaryLProthero,项目名称:Merchello,代码行数:19,代码来源:BraintreePaymentMethodApiService.cs


示例8: ProductFilterGroupQuery

 /// <summary>
 /// Initializes a new instance of the <see cref="ProductFilterGroupQuery"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello Context.
 /// </param>
 /// <param name="resolver">
 /// The resolver.
 /// </param>
 internal ProductFilterGroupQuery(IMerchelloContext merchelloContext, EntityCollectionProviderResolver resolver)
     : base(merchelloContext.Services.EntityCollectionService, merchelloContext.Cache.RequestCache)
 {
     Ensure.ParameterNotNull(merchelloContext, "merchelloContext");
     Ensure.ParameterNotNull(resolver, "resolver");
     this.Initialize(merchelloContext, resolver);
 }
开发者ID:rustyswayne,项目名称:Merchello,代码行数:16,代码来源:ProductFilterGroupQuery.cs


示例9: Text

        /// <summary>
        /// The text.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="area">
        /// The area.
        /// </param>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <returns>
        /// The <see cref="string"/>.
        /// </returns>
        internal static string Text(IMerchelloContext merchelloContext, string area, string key)
        {
            Mandate.ParameterNotNull(merchelloContext, "MerchelloContext");

            if (string.IsNullOrEmpty(area) || string.IsNullOrEmpty(key)) return string.Empty;

            var lang = "en";
            try
            {
                lang = MerchelloConfiguration.Current.Section.LogLocalization;
            }
            catch (Exception)
            {
                lang = "en";
            }

            var cacheKey = CacheKeys.GetLocalizationCacheKey(lang);

            var xdoc = XDocument.Parse((string)merchelloContext.Cache.RuntimeCache.GetCacheItem(cacheKey, () => ui.getLanguageFile(lang).InnerXml), LoadOptions.None);

            var xArea = xdoc.Descendants("area").FirstOrDefault(x => x.Attribute("alias").Value == area);

            if (xArea == null) return string.Empty;

            var xKey = xArea.Descendants("key").FirstOrDefault(x => x.Attribute("alias").Value == key);

            return xKey == null ? string.Empty : xKey.Value;
        }
开发者ID:arknu,项目名称:Merchello,代码行数:43,代码来源:Localize.cs


示例10: UnfulfilledItems

        /// <summary>
        /// Gets a collection of unfulfilled (unshipped) line items
        /// </summary>
        /// <param name="order">The <see cref="IOrder"/></param>
        /// <param name="merchelloContext">The <see cref="IMerchelloContext"/></param>
        /// <param name="items">A collection of <see cref="IOrderLineItem"/></param>
        /// <returns>The collection of <see cref="IOrderLineItem"/></returns>
        public static IEnumerable<IOrderLineItem> UnfulfilledItems(this IOrder order, IMerchelloContext merchelloContext, IEnumerable<IOrderLineItem> items)
        {

            if (Constants.DefaultKeys.OrderStatus.Fulfilled == order.OrderStatus.Key) return new List<IOrderLineItem>();

            var shippableItems = items.Where(x => x.IsShippable() && x.ShipmentKey == null).ToArray();

            var inventoryItems = shippableItems.Where(x => x.ExtendedData.GetTrackInventoryValue()).ToArray();

            // get the variants to check the inventory
            var variants = merchelloContext.Services.ProductVariantService.GetByKeys(inventoryItems.Select(x => x.ExtendedData.GetProductVariantKey())).ToArray();

            foreach (var item in inventoryItems)
            {
                var variant = variants.FirstOrDefault(x => x.Key == item.ExtendedData.GetProductVariantKey());
                if (variant == null) continue;

                // TODO refactor back ordering.
                //// check inventory
                //var inventory = variant.CatalogInventories.FirstOrDefault(x => x.CatalogKey == item.ExtendedData.GetWarehouseCatalogKey());
                //if (inventory != null)
                //    item.BackOrder = inventory.Count < item.Quantity;
            }

            return shippableItems;
        }
开发者ID:arknu,项目名称:Merchello,代码行数:33,代码来源:OrderExtensions.cs


示例11: AuditLogApiController

 /// <summary>
 /// Initializes a new instance of the <see cref="AuditLogApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public AuditLogApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
     _auditLogService = merchelloContext.Services.AuditLogService;
     _merchelloHelper = new MerchelloHelper(merchelloContext.Services);
 }
开发者ID:ProNotion,项目名称:Merchello,代码行数:13,代码来源:AuditLogApiController.cs


示例12: ProductDataService

 public ProductDataService(IMerchelloContext merchelloContext)
 {
     //TODO Figure out how to get MerchelloContext instantiated before ExamineManager 
     // attempts to interact with the index
     //Mandate.ParameterNotNull(merchelloContext, "MerchelloContext");
     _merchelloContext = merchelloContext;
 }
开发者ID:arknu,项目名称:Merchello,代码行数:7,代码来源:ProductDataService.cs


示例13: Currency

 /// <summary>
 /// The currency.
 /// </summary>
 /// <param name="invoice">
 /// The invoice.
 /// </param>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <returns>
 /// The <see cref="ICurrency"/>.
 /// </returns>
 internal static ICurrency Currency(this IInvoice invoice, IMerchelloContext merchelloContext)
 {
     var currencyCode = invoice.CurrencyCode();
     return !string.IsNullOrEmpty(currencyCode)
                ? merchelloContext.Services.StoreSettingService.GetCurrencyByCode(currencyCode)
                : null;
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:19,代码来源:InvoiceExtensions.cs


示例14: ProductOptionApiController

 /// <summary>
 /// Initializes a new instance of the <see cref="ProductOptionApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="contentTypeService">
 /// Umbraco's <see cref="IContentTypeService"/>
 /// </param>
 public ProductOptionApiController(IMerchelloContext merchelloContext, IContentTypeService contentTypeService)
     : base(merchelloContext)
 {
     Mandate.ParameterNotNull(contentTypeService, "contentTypeService");
     _contentTypeService = contentTypeService;
     _productOptionService = merchelloContext.Services.ProductOptionService;
 }
开发者ID:jlarc,项目名称:Merchello,代码行数:16,代码来源:ProductOptionApiController.cs


示例15: InvoiceApiController

 /// <summary>
 /// Initializes a new instance of the <see cref="InvoiceApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public InvoiceApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _storeSettingService = MerchelloContext.Services.StoreSettingService as StoreSettingService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _noteService = merchelloContext.Services.NoteService;
     _merchello = new MerchelloHelper(merchelloContext, false);
 }
开发者ID:jlarc,项目名称:Merchello,代码行数:14,代码来源:InvoiceApiController.cs


示例16: PaymentProcessor

        /// <summary>
        /// Initializes a new instance of the <see cref="PaymentProcessor"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>e
        /// <param name="request">
        /// The request.
        /// </param>
        public PaymentProcessor(IMerchelloContext merchelloContext, PaymentRequestDisplay request)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");

            this._merchelloContext = merchelloContext;

            this.Initialize(request);
        }
开发者ID:drpeck,项目名称:Merchello,代码行数:17,代码来源:PaymentProcessor.cs


示例17: DefaultWarehousePackagingStrategy

 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultWarehousePackagingStrategy"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="lineItemCollection">
 /// The line item collection.
 /// </param>
 /// <param name="destination">
 /// The destination.
 /// </param>
 /// <param name="versionKey">
 /// The version key.
 /// </param>
 public DefaultWarehousePackagingStrategy(
     IMerchelloContext merchelloContext,
     LineItemCollection lineItemCollection,
     IAddress destination,
     Guid versionKey)
     : base(merchelloContext, lineItemCollection, destination, versionKey)
 {
 }
开发者ID:GaryLProthero,项目名称:Merchello,代码行数:23,代码来源:DefaultWarehousePackagingStrategy.cs


示例18: ShipmentResultNotifyModelFactory

        /// <summary>
        /// Initializes a new instance of the <see cref="ShipmentResultNotifyModelFactory"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The <see cref="IMerchelloContext"/>.
        /// </param>
        public ShipmentResultNotifyModelFactory(IMerchelloContext merchelloContext)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");

            _invoiceService = merchelloContext.Services.InvoiceService;
            _orderService = merchelloContext.Services.OrderService;
            _storeSettingService = merchelloContext.Services.StoreSettingService;
        }
开发者ID:rustyswayne,项目名称:Merchello,代码行数:14,代码来源:ShipmentResultNotifyModelFactory.cs


示例19: MerchelloApiController

        /// <summary>
        /// Initializes a new instance of the <see cref="MerchelloApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="umbracoContext">
        /// The umbraco context.
        /// </param>
        protected MerchelloApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
            : base(umbracoContext)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");

            MerchelloContext = merchelloContext;
            InstanceId = Guid.NewGuid();
        }
开发者ID:jlarc,项目名称:Merchello,代码行数:17,代码来源:MerchelloApiController.cs


示例20: MerchelloDataService

        public MerchelloDataService(IMerchelloContext merchelloContext)
        {
            ProductDataService = new ProductDataService(merchelloContext);
            InvoiceDataService = new InvoiceDataService(merchelloContext);
            OrderDataService = new OrderDataService(merchelloContext);

            LogService = new MerchelloLogService();
        }
开发者ID:BatJan,项目名称:Merchello,代码行数:8,代码来源:MerchelloDataService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMesh类代码示例发布时间:2022-05-24
下一篇:
C# IMenuService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap