public virtual Notification ToLiquidNotification(StorefrontNotification notification)
        {
            var result = new Notification();

            result.InjectFrom <NullableAndEnumValueInjecter>(notification);
            return(result);
        }
        public virtual Notification ToLiquidNotification(StorefrontNotification notification)
        {
            var factory = ServiceLocator.Current.GetInstance <ShopifyModelFactory>();
            var result  = factory.CreateNotification();

            result.InjectFrom <NullableAndEnumValueInjecter>(notification);
            return(result);
        }
示例#3
0
        public static Notification ToShopifyModel(this StorefrontNotification storefrontModel)
        {
            var shopifyModel = new Notification();

            shopifyModel.Message = storefrontModel.Message;
            shopifyModel.Title   = storefrontModel.Title;
            shopifyModel.Type    = storefrontModel.Type.ToString();

            return(shopifyModel);
        }
示例#4
0
        public virtual Notification ToLiquidNotification(StorefrontNotification notification)
        {
            var result = new Notification();

            result.Message = notification.Message;
            result.Title   = notification.Title;
            result.Type    = notification.Type.ToString();

            return(result);
        }
        public static Notification ToShopifyModel(this StorefrontNotification notification)
        {
            var converter = ServiceLocator.Current.GetInstance <ShopifyModelConverter>();

            return(converter.ToLiquidNotification(notification));
        }
示例#6
0
        public static Notification ToShopifyModel(this StorefrontNotification notification)
        {
            var converter = new ShopifyModelConverter();

            return(converter.ToLiquidNotification(notification));
        }