コード例 #1
0
        public static KonaSite GetSite(string url)
        {
            IObjectStore store = new ObjectStore();
            KonaSite     site  = store.Get <KonaSite>("Site", url);

            if (site == null)
            {
                site = new KonaSite();

                site.AdminEmail          = "*****@*****.**";
                site.Description         = "Fuji Test Site";
                site.IsPublic            = true;
                site.LanguageCode        = "en";
                site.Owner               = "admin";
                site.OwnerName           = "Microsoft Corporation";
                site.SiteHost            = "localhost";
                site.SiteName            = "Kona Demo Site";
                site.SiteUrl             = url;
                site.SiteID              = Guid.NewGuid();
                site.RPXAPIKey           = "9b9002f34658471c99ac569e125dca9afa095132";
                site.RPXNowUrl           = "https://localhost18622.rpxnow.com/openid/embed";
                site.AddressForm         = "USDefault";
                site.AcceptCreditCards   = true;
                site.AcceptPayPal        = true;
                site.AcceptPOs           = false;
                site.PayPalPDTToken      = "JijaVlgNlwzXc5N_Zj53LS-v5EmzqsQGMa6eZcKyXad8hH7dn08ntEZlcAW";
                site.CreditCardForm      = "DefaultCreditCard";
                site.PayPalForm          = "DefaultPayPalStandard";
                site.CurrencyCode        = "USD";
                site.PayPalBusinessEmail = "*****@*****.**";
                site.OrderDetailView     = "DefaultItems";
                site.OrderHeaderView     = "DefaultHeader";

                site.SMTPLogin           = "******";
                site.SMTPPassword        = "******";
                site.SMTPServer          = "Myserver.com";
                site.TaxPlugin           = "USTaxCalculator";
                site.ShippingPlugin      = "SimpleShippingCalculator";
                site.CreditCardProcessor = "FakeProcessor";
            }

            // In case the deserialization format changed or sth went wrong
            if (string.IsNullOrEmpty(site.ThemeName))
            {
                site.ThemeName = "Eko";
            }

            return(site);
        }
コード例 #2
0
ファイル: KonaSite.cs プロジェクト: christattum/Kona
        public static KonaSite GetSite(string url) {
            IObjectStore store=new ObjectStore();
            KonaSite site = store.Get<KonaSite>("Site", url);
            if (site == null)
            {
                site = new KonaSite();

                site.AdminEmail = "*****@*****.**";
                site.Description = "Fuji Test Site";
                site.IsPublic = true;
                site.LanguageCode = "en";
                site.Owner = "admin";
                site.OwnerName = "Microsoft Corporation";
                site.SiteHost = "localhost";
                site.SiteName = "Kona Demo Site";
                site.SiteUrl = url;
                site.SiteID = Guid.NewGuid();
                site.RPXAPIKey = "9b9002f34658471c99ac569e125dca9afa095132";
                site.RPXNowUrl = "https://localhost18622.rpxnow.com/openid/embed";
                site.AddressForm = "USDefault";
                site.AcceptCreditCards = true;
                site.AcceptPayPal = true;
                site.AcceptPOs = false;
                site.PayPalPDTToken = "JijaVlgNlwzXc5N_Zj53LS-v5EmzqsQGMa6eZcKyXad8hH7dn08ntEZlcAW";
                site.CreditCardForm = "DefaultCreditCard";
                site.PayPalForm = "DefaultPayPalStandard";
                site.CurrencyCode = "USD";
                site.PayPalBusinessEmail = "*****@*****.**";
                site.OrderDetailView = "DefaultItems";
                site.OrderHeaderView = "DefaultHeader";

                site.SMTPLogin = "******";
                site.SMTPPassword = "******";
                site.SMTPServer = "Myserver.com";
                site.TaxPlugin = "USTaxCalculator";
                site.ShippingPlugin = "SimpleShippingCalculator";
                site.CreditCardProcessor = "FakeProcessor";
            }

            // In case the deserialization format changed or sth went wrong
            if (string.IsNullOrEmpty(site.ThemeName)) {
                site.ThemeName = "Eko";
            }

            return site;
        }