Esempio n. 1
0
        public PluginBuilder(Assembly assembly
			, Microsoft.Practices.Unity.IUnityContainer container
			, System.Web.HttpContextBase context
			, Models.WebSiteSettings webSiteSettings)
        {
            this.assembly = assembly;
            this.m_Container = container;
            this.m_HttpContext = context;
            this.m_WebSiteSettings = webSiteSettings;

            foreach (Type type in assembly.GetExportedTypes())
            {
                if (!type.IsAbstract && typeof(PluginInit).IsAssignableFrom(type))
                {
                    pluginTypes.Add(type);
                }
            }
        }
Esempio n. 2
0
        public ERPStore.Models.WebSiteSettings GetWebSiteSettings(string host)
        {
            m_Settings = new Models.WebSiteSettings();
            m_Settings.Contact.ContactEmail = "*****@*****.**";
            m_Settings.Contact.ContactFaxNumber = "0102030405";
            m_Settings.Contact.ContactPhoneNumber = "0102030405";
            m_Settings.Texts.Copyright = "copyright";
            m_Settings.HomeMetaDescription = "1st ECommerce in the world";
            m_Settings.HomeMetaKeywords = "erpstore, erp360, serialcoder";
            m_Settings.LogoImageFileName = "";
            m_Settings.Contact.OfficeHours = "officehours";
            m_Settings.Payment.ShowPriceWithTax = false;
            m_Settings.SiteName = "ERPStore-DefaultSkin";
            m_Settings.Sloggan = "MVC ECommerce by erpstore";
            m_Settings.Texts.TermsAndConditions = "terms and conditions";
            m_Settings.TempPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), m_Settings.SiteName);
            m_Settings.UseFullTextIndex = false;
            m_Settings.AllowGenerateSitemaps = false;
            // m_Settings.Menus = GetMenu();

            //m_Settings.Payment. = new ERPStore.Models.OgoneSettings()
            //{
            //    PSPID = "erpstore",
            //    SHASignIn = "v4FmLR/SSQ6Q/wvKbVtN",
            //    SHASignOut = @"BV<pMY(%YJ%s:TFBNkRSG*\SN",
            //    Target = ERPStore.Models.OgoneTargetPlatform.Test,
            //};

            var conveyor = new Models.Conveyor();
            conveyor.Id = 1;
            conveyor.Name = "MockConveyor";
            conveyor.UnitPriceByTransportLevel = 0;

            m_Settings.Shipping.DefaultConveyor = conveyor;
            m_Settings.Shipping.ConveyorList.Add(conveyor);

            var cryptoProvider = new System.Security.Cryptography.RC2CryptoServiceProvider();
            cryptoProvider.GenerateKey();
            cryptoProvider.GenerateIV();

            m_Settings.CryptoIV = cryptoProvider.IV;
            m_Settings.CryptoKey = cryptoProvider.Key;

            return m_Settings;
        }