Example #1
0
 private  IList<int> ProcessRolesFilter(IList<string> currentUserRoles)
 {
  
     var rolesToFilter = new List<int>();
     currentUserRoles.Each(r =>
     {
         switch (r)
         {
             case RolesConstants.SuperAdmin:
                 rolesToFilter.AddRange(new int[]
             {
                 RolesConstants.RoleIdsDictionary[RolesConstants.SetupSuperAdmin],
                 RolesConstants.RoleIdsDictionary[RolesConstants.ActivitySuperAdmin],
             });
                 break;
             case RolesConstants.SetupSuperAdmin:
                 rolesToFilter.AddRange(new int[]
             {
                 RolesConstants.RoleIdsDictionary[RolesConstants.StateAdmin]
             });
                 break;
             case RolesConstants.StateAdmin:
                 rolesToFilter.AddRange(new int[]
             {
                 RolesConstants.RoleIdsDictionary[RolesConstants.SetupStateAdmin],
                 RolesConstants.RoleIdsDictionary[RolesConstants.ActivityStateAdmin],
             });
                 break;
         }
     });
     return rolesToFilter;
 }
Example #2
0
        public int Execute()
        {
            try
            {
                prepareResultsFolder();

                _projects = _projectFiles.Select(file =>
                {
                    Console.WriteLine("Loading Project at " + file);
                    return Project.LoadFromFile(file) as IProject;
                }).ToList();

                var names = _projects.Select(x => x.Name).ToArray().Join(", ");
                _summary.Start("Project(s):  " + names, DateTime.Now);

                _projects.Each(p =>
                {
                    Console.WriteLine("Running Project " + p.Name);
                    executeProject(p);
                });

                _summary.WriteFile(_resultsFile);

                return createFinalResult();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                throw;
            }
        }
Example #3
0
 public void Send(IList<MobileItem> items)
 {
     items.Each(mobileItem =>
     {
         var result = service.SendSingleMessage(categoryId, mobileItem.MobileNumber, mobileItem.MobileMessage);
         if (result.ResultNo != 0)
             AppInfoCenterService.LoggingService.Error(AlarmConfigurationBase.ModuleName, "MailService", "Send", 
                 string.Format("发送短信出错,发送结果代码:{0}", result.ToString()));
     });
 }
 public void SetUp()
 {
     documentStore = new EmbeddableDocumentStore {RunInMemory = true}.Initialize();
     presentations = Builder<Presentation>.CreateListOfSize(5)
                                         .TheFirst(1).With(x => x.PresentationDate = DateTime.Today.AddDays(-1))
                                         .With(x => x.Booked = true)
                                         .TheNext(4).With(x => x.PresentationDate > DateTime.Today)
                                         .With(x => x.Booked = true)
                                         .TheLast(1).With(x => x.Booked = false)
                                         .Build();
     var session = documentStore.OpenSession();
     presentations.Each(session.Store);
     session.SaveChanges();
 }
        public PersistentTaskController(ChannelGraph graph, ILogger logger, ITaskMonitoringSource factory, IList<IPersistentTaskSource> sources)
        {
            _graph = graph;
            _logger = logger;
            _factory = factory;
            sources.Each(x => _sources[x.Protocol] = x);

            _agents.OnMissing = uri => {
                var persistentTask = FindTask(uri);
                return persistentTask == null ? null : _factory.BuildAgentFor(persistentTask);
            };

            _permanentTasks = sources.SelectMany(x => x.PermanentTasks()).ToArray();
        }
Example #6
0
 public void Send(IList<MailItem> items)
 {
     items.Each(mailItem =>
     {
         Message message = new Message();
         message.BodyHtml = mailItem.MailBody;
         message.Subject = mailItem.MailTitle;
         message.Charset = Encoding.UTF8;
         message.From = new Address(username, "Adhesive框架邮件服务");
         message.To = new AddressList() { mailItem.MailAddress };
         try
         {
             Smtp.Send(message, hostName, 25, "5173.com", SmtpAuthentication.Any, username, password);
         }
         catch (Exception ex)
         {
             ex.Handle(AlarmConfigurationBase.ModuleName, "MailService", "Send");
         }
     });
 }
        /// <summary>
        /// Stores the specified web assets with the specified details.
        /// </summary>
        /// <param name="contentType">Type of the content.</param>
        /// <param name="version">The version.</param>
        /// <param name="compress">if set to <c>true</c> [compress].</param>
        /// <param name="cacheDurationInDays">The cache duration in days.</param>
        /// <param name="items">The items.</param>
        /// <returns>Returns the id.</returns>
        public string Store(string contentType, string version, bool compress, float cacheDurationInDays, IList<string> items)
        {
            Guard.IsNotNullOrEmpty(contentType, "contentType");
            Guard.IsNotNullOrEmpty(version, "version");
            Guard.IsNotNegative(cacheDurationInDays, "cacheDurationInDays");
            Guard.IsNotNullOrEmpty(items, "items");
            items.Each(item => Guard.IsNotVirtualPath(item, "item"));

            MergedAsset mergedAsset = CreateMergedAssetWith(contentType, version, compress, cacheDurationInDays, items);
            string id = CreateIdFrom(mergedAsset);

            EnsureAsset(mergedAsset, id);

            return id;
        }
        protected override void Alter(IList<Country> entities)
        {
            base.Alter(entities);

            entities.Each(x => x.Published = false);

            entities.WithKey(x => x.NumericIsoCode)

            .Alter(276, x =>
            {
                x.Name = "Deutschland";
                x.DisplayOrder = -10;
                x.Published = true;
                #region Provinces
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Baden-Württemberg",
                    Abbreviation = "BW",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Bayern",
                    Abbreviation = "BY",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Berlin",
                    Abbreviation = "BE",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Brandenburg",
                    Abbreviation = "BB",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Bremen",
                    Abbreviation = "HB",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Hamburg",
                    Abbreviation = "HH",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Hessen",
                    Abbreviation = "HE",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Mecklenburg-Vorpommern",
                    Abbreviation = "MV",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Niedersachsen",
                    Abbreviation = "NI",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Nordrhein-Westfalen",
                    Abbreviation = "NW",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Rheinland-Pfalz",
                    Abbreviation = "RP",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Saarland",
                    Abbreviation = "SL",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Sachsen",
                    Abbreviation = "SN",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Sachsen-Anhalt",
                    Abbreviation = "ST",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Schleswig-Holstein",
                    Abbreviation = "SH",
                    Published = true,
                    DisplayOrder = 1,
                });
                x.StateProvinces.Add(new StateProvince()
                {
                    Name = "Thüringen",
                    Abbreviation = "TH",
                    Published = true,
                    DisplayOrder = 1,
                });
                #endregion Provinces
            })
            .Alter(40, x =>
                {
                    x.Name = "Österreich";
                    x.DisplayOrder = -5;
                    #region Provinces
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Burgenland",
                        Abbreviation = "Bgld.",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Kärnten",
                        Abbreviation = "Ktn.",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Niderösterreich",
                        Abbreviation = "NÖ",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Oberösterreich",
                        Abbreviation = "OÖ",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Salzburg",
                        Abbreviation = "Sbg.",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Steiermark",
                        Abbreviation = "Stmk.",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Tiral",
                        Abbreviation = "T",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Vorarlberg",
                        Abbreviation = "Vbg.",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Wien",
                        Abbreviation = "W",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    #endregion Provinces
                })
            .Alter(756, x =>
                {
                    x.Name = "Schweiz";
                    x.DisplayOrder = -1;
                    #region Provinces
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Zürich",
                        Abbreviation = "ZH",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Bern",
                        Abbreviation = "BE",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Luzern",
                        Abbreviation = "LU",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Uri",
                        Abbreviation = "UR",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Schwyz",
                        Abbreviation = "SZ",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Obwalden",
                        Abbreviation = "OW",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Nidwalden",
                        Abbreviation = "ST",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Glarus",
                        Abbreviation = "GL",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Zug",
                        Abbreviation = "ZG",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Freiburg",
                        Abbreviation = "FR",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Solothurn",
                        Abbreviation = "SO",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Basel-Stadt",
                        Abbreviation = "BS",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Basel-Landschaft",
                        Abbreviation = "BL",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Schaffhausen",
                        Abbreviation = "SH",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Appenzell Ausserrhoden",
                        Abbreviation = "AR",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Appenzell Innerrhoden",
                        Abbreviation = "AI",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "St. Gallen",
                        Abbreviation = "SG",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Graubünden",
                        Abbreviation = "GR",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Aargau",
                        Abbreviation = "AG",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Thurgau",
                        Abbreviation = "TG",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Tessin",
                        Abbreviation = "Ti",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Waadt",
                        Abbreviation = "VD",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Wallis",
                        Abbreviation = "VS",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Neuenburg",
                        Abbreviation = "NE",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Genf",
                        Abbreviation = "GE",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    x.StateProvinces.Add(new StateProvince()
                    {
                        Name = "Jura",
                        Abbreviation = "JU",
                        Published = true,
                        DisplayOrder = 1,
                    });
                    #endregion Provinces
                })
            .Alter(840, x =>
                {
                    x.Name = "Vereinigte Staaten von Amerika";
                    x.DisplayOrder = 100;
                })
            .Alter(124, x =>
                {
                    x.Name = "Kanada";
                    x.DisplayOrder = 100;
                })
            .Alter(32, x =>
                {
                    x.Name = "Argentinien";
                    x.DisplayOrder = 100;
                })
            .Alter(51, x =>
                {
                    x.Name = "Armenien";
                    x.DisplayOrder = 100;
                })
            .Alter(533, x =>
                {
                    x.Name = "Aruba";
                    x.DisplayOrder = 100;
                })
            .Alter(36, x =>
                {
                    x.Name = "Australien";
                    x.DisplayOrder = 100;
                })
            .Alter(31, x =>
                {
                    x.Name = "Aserbaidschan";
                    x.DisplayOrder = 100;
                })
            .Alter(44, x =>
                {
                    x.Name = "Bahamas";
                    x.DisplayOrder = 100;
                })
            .Alter(50, x =>
                {
                    x.Name = "Bangladesh";
                    x.DisplayOrder = 100;
                })
            .Alter(112, x =>
                {
                    x.Name = "Weissrussland";
                    x.DisplayOrder = 100;
                })
            .Alter(56, x =>
                {
                    x.Name = "Belgien";
                    x.DisplayOrder = 100;
                })
            .Alter(84, x =>
                {
                    x.Name = "Belize";
                    x.DisplayOrder = 100;
                })
            .Alter(60, x =>
                {
                    x.Name = "Bermudas";
                    x.DisplayOrder = 100;
                })
            .Alter(68, x =>
                {
                    x.Name = "Bolivien";
                    x.DisplayOrder = 100;
                })
            .Alter(70, x =>
                {
                    x.Name = "Bosnien-Herzegowina";
                    x.DisplayOrder = 100;
                })
            .Alter(76, x =>
                {
                    x.Name = "Brasilien";
                    x.DisplayOrder = 100;
                })
            .Alter(100, x =>
                {
                    x.Name = "Bulgarien";
                    x.DisplayOrder = 100;
                })
            .Alter(136, x =>
                {
                    x.Name = "Kaiman Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(152, x =>
                {
                    x.Name = "Chile";
                    x.DisplayOrder = 100;
                })
            .Alter(156, x =>
                {
                    x.Name = "China";
                    x.DisplayOrder = 100;
                })
            .Alter(170, x =>
                {
                    x.Name = "Kolumbien";
                    x.DisplayOrder = 100;
                })
            .Alter(188, x =>
                {
                    x.Name = "Costa Rica";
                    x.DisplayOrder = 100;
                })
            .Alter(191, x =>
                {
                    x.Name = "Kroatien";
                    x.DisplayOrder = 100;
                })
            .Alter(192, x =>
                {
                    x.Name = "Kuba";
                    x.DisplayOrder = 100;
                })
            .Alter(196, x =>
                {
                    x.Name = "Zypern";
                    x.DisplayOrder = 100;
                })
            .Alter(203, x =>
                {
                    x.Name = "Tschechische Republik";
                    x.DisplayOrder = 100;
                })
            .Alter(208, x =>
                {
                    x.Name = "Dänemark";
                    x.DisplayOrder = 100;
                })
            .Alter(214, x =>
                {
                    x.Name = "Dominikanische Republik";
                    x.DisplayOrder = 100;
                })
            .Alter(218, x =>
                {
                    x.Name = "Ecuador";
                    x.DisplayOrder = 100;
                })
            .Alter(818, x =>
                {
                    x.Name = "Ägypten";
                    x.DisplayOrder = 100;
                })
            .Alter(246, x =>
                {
                    x.Name = "Finnland";
                    x.DisplayOrder = 100;
                })
            .Alter(250, x =>
                {
                    x.Name = "Frankreich";
                    x.DisplayOrder = 100;
                })
            .Alter(268, x =>
                {
                    x.Name = "Georgien";
                    x.DisplayOrder = 100;
                })
            .Alter(292, x =>
                {
                    x.Name = "Gibraltar";
                    x.DisplayOrder = 100;
                })
            .Alter(300, x =>
                {
                    x.Name = "Griechenland";
                    x.DisplayOrder = 100;
                })
            .Alter(320, x =>
                {
                    x.Name = "Guatemala";
                    x.DisplayOrder = 100;
                })
            .Alter(344, x =>
                {
                    x.Name = "Hong Kong";
                    x.DisplayOrder = 100;
                })
            .Alter(348, x =>
                {
                    x.Name = "Ungarn";
                    x.DisplayOrder = 100;
                })
            .Alter(356, x =>
                {
                    x.Name = "Indien";
                    x.DisplayOrder = 100;
                })
            .Alter(360, x =>
                {
                    x.Name = "Indonesien";
                    x.DisplayOrder = 100;
                })
            .Alter(372, x =>
                {
                    x.Name = "Irland";
                    x.DisplayOrder = 100;
                })
            .Alter(376, x =>
                {
                    x.Name = "Israel";
                    x.DisplayOrder = 100;
                })
            .Alter(380, x =>
                {
                    x.Name = "Italien";
                    x.DisplayOrder = 100;
                })
            .Alter(388, x =>
                {
                    x.Name = "Jamaika";
                    x.DisplayOrder = 100;
                })
            .Alter(392, x =>
                {
                    x.Name = "Japan";
                    x.DisplayOrder = 100;
                })
            .Alter(400, x =>
                {
                    x.Name = "Jordanien";
                    x.DisplayOrder = 100;
                })
            .Alter(398, x =>
                {
                    x.Name = "Kasachstan";
                    x.DisplayOrder = 100;
                })
            .Alter(408, x =>
                {
                    x.Name = "Nord Korea";
                    x.DisplayOrder = 100;
                })
            .Alter(414, x =>
                {
                    x.Name = "Kuwait";
                    x.DisplayOrder = 100;
                })
            .Alter(458, x =>
                {
                    x.Name = "Malaysia";
                    x.DisplayOrder = 100;
                })
            .Alter(484, x =>
                {
                    x.Name = "Mexiko";
                    x.DisplayOrder = 100;
                })
            .Alter(528, x =>
                {
                    x.Name = "Niederlande";
                    x.DisplayOrder = 100;
                })
            .Alter(554, x =>
                {
                    x.Name = "Neuseeland";
                    x.DisplayOrder = 100;
                })
            .Alter(578, x =>
                {
                    x.Name = "Norwegen";
                    x.DisplayOrder = 100;
                })
            .Alter(586, x =>
                {
                    x.Name = "Pakistan";
                    x.DisplayOrder = 100;
                })
            .Alter(600, x =>
                {
                    x.Name = "Paraguay";
                    x.DisplayOrder = 100;
                })
            .Alter(604, x =>
                {
                    x.Name = "Peru";
                    x.DisplayOrder = 100;
                })
            .Alter(608, x =>
                {
                    x.Name = "Philippinen";
                    x.DisplayOrder = 100;
                })
            .Alter(616, x =>
                {
                    x.Name = "Polen";
                    x.DisplayOrder = 100;
                })
            .Alter(620, x =>
                {
                    x.Name = "Portugal";
                    x.DisplayOrder = 100;
                })
            .Alter(630, x =>
                {
                    x.Name = "Puerto Rico";
                    x.DisplayOrder = 100;
                })
            .Alter(634, x =>
                {
                    x.Name = "Qatar";
                    x.DisplayOrder = 100;
                })
            .Alter(642, x =>
                {
                    x.Name = "Rumänien";
                    x.DisplayOrder = 100;
                })
            .Alter(643, x =>
                {
                    x.Name = "Rußland";
                    x.DisplayOrder = 100;
                })
            .Alter(682, x =>
                {
                    x.Name = "Saudi Arabien";
                    x.DisplayOrder = 100;
                })
            .Alter(702, x =>
                {
                    x.Name = "Singapur";
                    x.DisplayOrder = 100;
                })
            .Alter(703, x =>
                {
                    x.Name = "Slowakei";
                    x.DisplayOrder = 100;
                })
            .Alter(705, x =>
                {
                    x.Name = "Slowenien";
                    x.DisplayOrder = 100;
                })
            .Alter(710, x =>
                {
                    x.Name = "Südafrika";
                    x.DisplayOrder = 100;
                })
            .Alter(724, x =>
                {
                    x.Name = "Spanien";
                    x.DisplayOrder = 100;
                })
            .Alter(752, x =>
                {
                    x.Name = "Schweden";
                    x.DisplayOrder = 100;
                })
            .Alter(158, x =>
                {
                    x.Name = "Taiwan";
                    x.DisplayOrder = 100;
                })
            .Alter(764, x =>
                {
                    x.Name = "Thailand";
                    x.DisplayOrder = 100;
                })
            .Alter(792, x =>
                {
                    x.Name = "Türkei";
                    x.DisplayOrder = 100;
                })
            .Alter(804, x =>
                {
                    x.Name = "Ukraine";
                    x.DisplayOrder = 100;
                })
            .Alter(784, x =>
                {
                    x.Name = "Vereinigte Arabische Emirate";
                    x.DisplayOrder = 100;
                })
            .Alter(826, x =>
                {
                    x.Name = "Großbritannien";
                    x.DisplayOrder = 100;
                })
            .Alter(581, x =>
                {
                    x.Name = "United States Minor Outlying Islands";
                    x.DisplayOrder = 100;
                })
            .Alter(858, x =>
                {
                    x.Name = "Uruguay";
                    x.DisplayOrder = 100;
                })
            .Alter(860, x =>
                {
                    x.Name = "Usbekistan";
                    x.DisplayOrder = 100;
                })
            .Alter(862, x =>
                {
                    x.Name = "Venezuela";
                    x.DisplayOrder = 100;
                })
            .Alter(688, x =>
                {
                    x.Name = "Serbien";
                    x.DisplayOrder = 100;
                })
            .Alter(4, x =>
                {
                    x.Name = "Afghanistan";
                    x.DisplayOrder = 100;
                })
            .Alter(8, x =>
                {
                    x.Name = "Albanien";
                    x.DisplayOrder = 100;
                })
            .Alter(12, x =>
                {
                    x.Name = "Algerien";
                    x.DisplayOrder = 100;
                })
            .Alter(16, x =>
                {
                    x.Name = "Samoa";
                    x.DisplayOrder = 100;
                })
            .Alter(20, x =>
                {
                    x.Name = "Andorra";
                    x.DisplayOrder = 100;
                })
            .Alter(24, x =>
                {
                    x.Name = "Angola";
                    x.DisplayOrder = 100;
                })
            .Alter(660, x =>
                {
                    x.Name = "Anguilla";
                    x.DisplayOrder = 100;
                })
            .Alter(10, x =>
                {
                    x.Name = "Antarktis";
                    x.DisplayOrder = 100;
                })
            .Alter(28, x =>
                {
                    x.Name = "Antigua und Barbuda";
                    x.DisplayOrder = 100;
                })
            .Alter(48, x =>
                {
                    x.Name = "Bahrain";
                    x.DisplayOrder = 100;
                })
            .Alter(52, x =>
                {
                    x.Name = "Barbados";
                    x.DisplayOrder = 100;
                })
            .Alter(204, x =>
                {
                    x.Name = "Benin";
                    x.DisplayOrder = 100;
                })
            .Alter(64, x =>
                {
                    x.Name = "Bhutan";
                    x.DisplayOrder = 100;
                })
            .Alter(72, x =>
                {
                    x.Name = "Botswana";
                    x.DisplayOrder = 100;
                })
            .Alter(74, x =>
                {
                    x.Name = "Bouvet Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(86, x =>
                {
                    x.Name = "Britisch-Indischer Ozean";
                    x.DisplayOrder = 100;
                })
            .Alter(96, x =>
                {
                    x.Name = "Brunei";
                    x.DisplayOrder = 100;
                })
            .Alter(854, x =>
                {
                    x.Name = "Burkina Faso";
                    x.DisplayOrder = 100;
                })
            .Alter(108, x =>
                {
                    x.Name = "Burundi";
                    x.DisplayOrder = 100;
                })
            .Alter(116, x =>
                {
                    x.Name = "Kambodscha";
                    x.DisplayOrder = 100;
                })
            .Alter(120, x =>
                {
                    x.Name = "Kamerun";
                    x.DisplayOrder = 100;
                })
            .Alter(132, x =>
                {
                    x.Name = "Kap Verde";
                    x.DisplayOrder = 100;
                })
            .Alter(140, x =>
                {
                    x.Name = "Zentralafrikanische Republik";
                    x.DisplayOrder = 100;
                })
            .Alter(148, x =>
                {
                    x.Name = "Tschad";
                    x.DisplayOrder = 100;
                })
            .Alter(162, x =>
                {
                    x.Name = "Christmas Island";
                    x.DisplayOrder = 100;
                })
            .Alter(166, x =>
                {
                    x.Name = "Kokosinseln";
                    x.DisplayOrder = 100;
                })
            .Alter(174, x =>
                {
                    x.Name = "Komoren";
                    x.DisplayOrder = 100;
                })
            .Alter(178, x =>
                {
                    x.Name = "Kongo";
                    x.DisplayOrder = 100;
                })
            .Alter(184, x =>
                {
                    x.Name = "Cook Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(384, x =>
                {
                    x.Name = "Elfenbeinküste";
                    x.DisplayOrder = 100;
                })
            .Alter(262, x =>
                {
                    x.Name = "Djibuti";
                    x.DisplayOrder = 100;
                })
            .Alter(212, x =>
                {
                    x.Name = "Dominika";
                    x.DisplayOrder = 100;
                })
            .Alter(222, x =>
                {
                    x.Name = "El Salvador";
                    x.DisplayOrder = 100;
                })
            .Alter(226, x =>
                {
                    x.Name = "Äquatorial Guinea";
                    x.DisplayOrder = 100;
                })
            .Alter(232, x =>
                {
                    x.Name = "Eritrea";
                    x.DisplayOrder = 100;
                })
            .Alter(233, x =>
                {
                    x.Name = "Estland";
                    x.DisplayOrder = 100;
                })
            .Alter(231, x =>
                {
                    x.Name = "Äthiopien";
                    x.DisplayOrder = 100;
                })
            .Alter(238, x =>
                {
                    x.Name = "Falkland Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(234, x =>
                {
                    x.Name = "Färöer Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(242, x =>
                {
                    x.Name = "Fidschi";
                    x.DisplayOrder = 100;
                })
            .Alter(254, x =>
                {
                    x.Name = "Französisch Guyana";
                    x.DisplayOrder = 100;
                })
            .Alter(258, x =>
                {
                    x.Name = "Französisch Polynesien";
                    x.DisplayOrder = 100;
                })
            .Alter(260, x =>
                {
                    x.Name = "Französisches Süd-Territorium";
                    x.DisplayOrder = 100;
                })
            .Alter(266, x =>
                {
                    x.Name = "Gabun";
                    x.DisplayOrder = 100;
                })
            .Alter(270, x =>
                {
                    x.Name = "Gambia";
                    x.DisplayOrder = 100;
                })
            .Alter(288, x =>
                {
                    x.Name = "Ghana";
                    x.DisplayOrder = 100;
                })
            .Alter(304, x =>
                {
                    x.Name = "Grönland";
                    x.DisplayOrder = 100;
                })
            .Alter(308, x =>
                {
                    x.Name = "Grenada";
                    x.DisplayOrder = 100;
                })
            .Alter(312, x =>
                {
                    x.Name = "Guadeloupe";
                    x.DisplayOrder = 100;
                })
            .Alter(316, x =>
                {
                    x.Name = "Guam";
                    x.DisplayOrder = 100;
                })
            .Alter(324, x =>
                {
                    x.Name = "Guinea";
                    x.DisplayOrder = 100;
                })
            .Alter(624, x =>
                {
                    x.Name = "Guinea Bissau";
                    x.DisplayOrder = 100;
                })
            .Alter(328, x =>
                {
                    x.Name = "Guyana";
                    x.DisplayOrder = 100;
                })
            .Alter(332, x =>
                {
                    x.Name = "Haiti";
                    x.DisplayOrder = 100;
                })
            .Alter(334, x =>
                {
                    x.Name = "Heard und McDonald Islands";
                    x.DisplayOrder = 100;
                })
            .Alter(340, x =>
                {
                    x.Name = "Honduras";
                    x.DisplayOrder = 100;
                })
            .Alter(352, x =>
                {
                    x.Name = "Island";
                    x.DisplayOrder = 100;
                })
            .Alter(364, x =>
                {
                    x.Name = "Iran";
                    x.DisplayOrder = 100;
                })
            .Alter(368, x =>
                {
                    x.Name = "Irak";
                    x.DisplayOrder = 100;
                })
            .Alter(404, x =>
                {
                    x.Name = "Kenia";
                    x.DisplayOrder = 100;
                })
            .Alter(296, x =>
                {
                    x.Name = "Kiribati";
                    x.DisplayOrder = 100;
                })
            .Alter(410, x =>
                {
                    x.Name = "Süd Korea";
                    x.DisplayOrder = 100;
                })
            .Alter(417, x =>
                {
                    x.Name = "Kirgisistan";
                    x.DisplayOrder = 100;
                })
            .Alter(418, x =>
                {
                    x.Name = "Laos";
                    x.DisplayOrder = 100;
                })
            .Alter(428, x =>
                {
                    x.Name = "Lettland";
                    x.DisplayOrder = 100;
                })
            .Alter(422, x =>
                {
                    x.Name = "Libanon";
                    x.DisplayOrder = 100;
                })
            .Alter(426, x =>
                {
                    x.Name = "Lesotho";
                    x.DisplayOrder = 100;
                })
            .Alter(430, x =>
                {
                    x.Name = "Liberia";
                    x.DisplayOrder = 100;
                })
            .Alter(434, x =>
                {
                    x.Name = "Libyen";
                    x.DisplayOrder = 100;
                })
            .Alter(438, x =>
                {
                    x.Name = "Liechtenstein";
                    x.DisplayOrder = 100;
                })
            .Alter(440, x =>
                {
                    x.Name = "Litauen";
                    x.DisplayOrder = 100;
                })
            .Alter(442, x =>
                {
                    x.Name = "Luxemburg";
                    x.DisplayOrder = 100;
                })
            .Alter(446, x =>
                {
                    x.Name = "Macao";
                    x.DisplayOrder = 100;
                })
            .Alter(807, x =>
                {
                    x.Name = "Mazedonien";
                    x.DisplayOrder = 100;
                })
            .Alter(450, x =>
                {
                    x.Name = "Madagaskar";
                    x.DisplayOrder = 100;
                })
            .Alter(454, x =>
                {
                    x.Name = "Malawi";
                    x.DisplayOrder = 100;
                })
            .Alter(462, x =>
                {
                    x.Name = "Malediven";
                    x.DisplayOrder = 100;
                })
            .Alter(466, x =>
                {
                    x.Name = "Mali";
                    x.DisplayOrder = 100;
                })
            .Alter(470, x =>
                {
                    x.Name = "Malta";
                    x.DisplayOrder = 100;
                })
            .Alter(584, x =>
                {
                    x.Name = "Marshall Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(474, x =>
                {
                    x.Name = "Martinique";
                    x.DisplayOrder = 100;
                })
            .Alter(478, x =>
                {
                    x.Name = "Mauretanien";
                    x.DisplayOrder = 100;
                })
            .Alter(480, x =>
                {
                    x.Name = "Mauritius";
                    x.DisplayOrder = 100;
                })
            .Alter(175, x =>
                {
                    x.Name = "Mayotte";
                    x.DisplayOrder = 100;
                })
            .Alter(583, x =>
                {
                    x.Name = "Mikronesien";
                    x.DisplayOrder = 100;
                })
            .Alter(498, x =>
                {
                    x.Name = "Moldavien";
                    x.DisplayOrder = 100;
                })
            .Alter(492, x =>
                {
                    x.Name = "Monaco";
                    x.DisplayOrder = 100;
                })
            .Alter(496, x =>
                {
                    x.Name = "Mongolei";
                    x.DisplayOrder = 100;
                })
            .Alter(500, x =>
                {
                    x.Name = "Montserrat";
                    x.DisplayOrder = 100;
                })
            .Alter(504, x =>
                {
                    x.Name = "Marokko";
                    x.DisplayOrder = 100;
                })
            .Alter(508, x =>
                {
                    x.Name = "Mocambique";
                    x.DisplayOrder = 100;
                })
            .Alter(104, x =>
                {
                    x.Name = "Birma";
                    x.DisplayOrder = 100;
                })
            .Alter(516, x =>
                {
                    x.Name = "Namibia";
                    x.DisplayOrder = 100;
                })
            .Alter(520, x =>
                {
                    x.Name = "Nauru";
                    x.DisplayOrder = 100;
                })
            .Alter(524, x =>
                {
                    x.Name = "Nepal";
                    x.DisplayOrder = 100;
                })
            .Alter(530, x =>
                {
                    x.Name = "Niederländische Antillen";
                    x.DisplayOrder = 100;
                })
            .Alter(540, x =>
                {
                    x.Name = "Neukaledonien";
                    x.DisplayOrder = 100;
                })
            .Alter(558, x =>
                {
                    x.Name = "Nicaragua";
                    x.DisplayOrder = 100;
                })
            .Alter(562, x =>
                {
                    x.Name = "Niger";
                    x.DisplayOrder = 100;
                })
            .Alter(566, x =>
                {
                    x.Name = "Nigeria";
                    x.DisplayOrder = 100;
                })
            .Alter(570, x =>
                {
                    x.Name = "Niue";
                    x.DisplayOrder = 100;
                })
            .Alter(574, x =>
                {
                    x.Name = "Norfolk Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(580, x =>
                {
                    x.Name = "Marianen";
                    x.DisplayOrder = 100;
                })
            .Alter(512, x =>
                {
                    x.Name = "Oman";
                    x.DisplayOrder = 100;
                })
            .Alter(585, x =>
                {
                    x.Name = "Palau";
                    x.DisplayOrder = 100;
                })
            .Alter(591, x =>
                {
                    x.Name = "Panama";
                    x.DisplayOrder = 100;
                })
            .Alter(598, x =>
                {
                    x.Name = "Papua Neuguinea";
                    x.DisplayOrder = 100;
                })
            .Alter(612, x =>
                {
                    x.Name = "Pitcairn";
                    x.DisplayOrder = 100;
                })
            .Alter(638, x =>
                {
                    x.Name = "Reunion";
                    x.DisplayOrder = 100;
                })
            .Alter(646, x =>
                {
                    x.Name = "Ruanda";
                    x.DisplayOrder = 100;
                })
            .Alter(659, x =>
                {
                    x.Name = "St. Kitts Nevis Anguilla";
                    x.DisplayOrder = 100;
                })
            .Alter(662, x =>
                {
                    x.Name = "Saint Lucia";
                    x.DisplayOrder = 100;
                })
            .Alter(670, x =>
                {
                    x.Name = "St. Vincent";
                    x.DisplayOrder = 100;
                })
            .Alter(882, x =>
                {
                    x.Name = "Samoa";
                    x.DisplayOrder = 100;
                })
            .Alter(674, x =>
                {
                    x.Name = "San Marino";
                    x.DisplayOrder = 100;
                })
            .Alter(678, x =>
                {
                    x.Name = "Sao Tome";
                    x.DisplayOrder = 100;
                })
            .Alter(686, x =>
                {
                    x.Name = "Senegal";
                    x.DisplayOrder = 100;
                })
            .Alter(690, x =>
                {
                    x.Name = "Seychellen";
                    x.DisplayOrder = 100;
                })
            .Alter(694, x =>
                {
                    x.Name = "Sierra Leone";
                    x.DisplayOrder = 100;
                })
            .Alter(90, x =>
                {
                    x.Name = "Solomon Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(706, x =>
                {
                    x.Name = "Somalia";
                    x.DisplayOrder = 100;
                })
            .Alter(239, x =>
                {
                    x.Name = "South Georgia, South Sandwich Isl.";
                    x.DisplayOrder = 100;
                })
            .Alter(144, x =>
                {
                    x.Name = "Sri Lanka";
                    x.DisplayOrder = 100;
                })
            .Alter(654, x =>
                {
                    x.Name = "St. Helena";
                    x.DisplayOrder = 100;
                })
            .Alter(666, x =>
                {
                    x.Name = "St. Pierre und Miquelon";
                    x.DisplayOrder = 100;
                })
            .Alter(736, x =>
                {
                    x.Name = "Sudan";
                    x.DisplayOrder = 100;
                })
            .Alter(740, x =>
                {
                    x.Name = "Surinam";
                    x.DisplayOrder = 100;
                })
            .Alter(744, x =>
                {
                    x.Name = "Svalbard und Jan Mayen Islands";
                    x.DisplayOrder = 100;
                })
            .Alter(748, x =>
                {
                    x.Name = "Swasiland";
                    x.DisplayOrder = 100;
                })
            .Alter(760, x =>
                {
                    x.Name = "Syrien";
                    x.DisplayOrder = 100;
                })
            .Alter(762, x =>
                {
                    x.Name = "Tadschikistan";
                    x.DisplayOrder = 100;
                })
            .Alter(834, x =>
                {
                    x.Name = "Tansania";
                    x.DisplayOrder = 100;
                })
            .Alter(768, x =>
                {
                    x.Name = "Togo";
                    x.DisplayOrder = 100;
                })
            .Alter(772, x =>
                {
                    x.Name = "Tokelau";
                    x.DisplayOrder = 100;
                })
            .Alter(776, x =>
                {
                    x.Name = "Tonga";
                    x.DisplayOrder = 100;
                })
            .Alter(780, x =>
                {
                    x.Name = "Trinidad Tobago";
                    x.DisplayOrder = 100;
                })
            .Alter(788, x =>
                {
                    x.Name = "Tunesien";
                    x.DisplayOrder = 100;
                })
            .Alter(795, x =>
                {
                    x.Name = "Turkmenistan";
                    x.DisplayOrder = 100;
                })
            .Alter(796, x =>
                {
                    x.Name = "Turks und Kaikos Inseln";
                    x.DisplayOrder = 100;
                })
            .Alter(798, x =>
                {
                    x.Name = "Tuvalu";
                    x.DisplayOrder = 100;
                })
            .Alter(800, x =>
                {
                    x.Name = "Uganda";
                    x.DisplayOrder = 100;
                })
            .Alter(548, x =>
                {
                    x.Name = "Vanuatu";
                    x.DisplayOrder = 100;
                })
            .Alter(336, x =>
                {
                    x.Name = "Vatikan";
                    x.DisplayOrder = 100;
                })
            .Alter(704, x =>
                {
                    x.Name = "Vietnam";
                    x.DisplayOrder = 100;
                })
            .Alter(92, x =>
                {
                    x.Name = "Virgin Island (Brit.)";
                    x.DisplayOrder = 100;
                })
            .Alter(850, x =>
                {
                    x.Name = "Virgin Island (USA)";
                    x.DisplayOrder = 100;
                })
            .Alter(876, x =>
                {
                    x.Name = "Wallis et Futuna";
                    x.DisplayOrder = 100;
                })
            .Alter(732, x =>
                {
                    x.Name = "Westsahara";
                    x.DisplayOrder = 100;
                })
            .Alter(887, x =>
                {
                    x.Name = "Jemen";
                    x.DisplayOrder = 100;
                })
            .Alter(894, x =>
                {
                    x.Name = "Sambia";
                    x.DisplayOrder = 100;
                })
            .Alter(716, x =>
                {
                    x.Name = "Zimbabwe";
                    x.DisplayOrder = 100;
                });
        }
        protected override void Alter(IList<Currency> entities)
        {
            base.Alter(entities);

            // unpublish all currencies
            entities.Each(x => x.Published = false);

            entities.WithKey(x => x.DisplayLocale)
               .Alter("de-DE", x =>
               {
                   x.Published = true;
                   x.Rate = 1M;
                   x.DisplayOrder = -10;
               })
               .Alter("de-CH", x =>
               {
                   x.Rate = 1.20M;
                   x.DisplayOrder = -5;
               })
               .Alter("en-US", x => x.Rate = 1.29M)
               .Alter("en-AU", x => x.Rate = 1.24M)
               .Alter("en-CA", x => x.Rate = 1.28M)
               .Alter("tr-TR", x => x.Rate = 2.31M)
               .Alter("zh-CN", x => x.Rate = 8.02M)
               .Alter("zh-HK", x => x.Rate = 9.98M)
               .Alter("ja-JP", x => x.Rate = 106.21M)
               .Alter("ru-RU", x => x.Rate = 40.16M)
               .Alter("sv-SE", x => x.Rate = 8.60M);
        }