Ejemplo n.º 1
0
        /// <summary>
        /// The product option repository re index.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The product keys.
        /// </param>
        /// <remarks>
        /// REFACTOR v3
        /// </remarks>
        private void ProductOptionRepositoryReIndex(ProductOptionRepository sender, Core.Events.ObjectEventArgs <IEnumerable <Guid> > e)
        {
            var keys = e.EventObject;

            if (MerchelloContext.HasCurrent)
            {
                var products     = MerchelloContext.Current.Services.ProductService.GetByKeys(keys).ToArray();
                var contentCache = new VirtualProductContentCache();
                foreach (var p in products)
                {
                    IndexProduct(p);

                    // we also need to refresh the published product cache
                    contentCache.ClearVirtualCache(p);
                }
            }
        }
        private void SmtpNotificatoinGatewayMethod_Sending(SmtpNotificationGatewayMethod sender, Core.Events.ObjectEventArgs <System.Net.Mail.MailMessage> e)
        {
            var msg = e.EventObject;

            msg.BodyEncoding = System.Text.Encoding.UTF8;
        }