private ArubaConfig[] InitializeConfigs()
        {
            var configs = new ArubaConfig[EntitiesCount];

            for (var i = 0; i < EntitiesCount; i++)
            {
                if (i % 2 == 0)
                {
                    var config = new ArubaConfig
                    {
                        Arch     = "Config Architecture " + i % 3,
                        Lang     = "Config Language" + i,
                        OS       = "Config Operating System" + i,
                        Failures = new List <ArubaFailure>(),
                    };
                    configs[i] = config;
                }
                else
                {
                    var machineConfig = new ArubaMachineConfig
                    {
                        Address  = new Guid(new string((char)((i % 8) + '0'), 32)),
                        Arch     = "Machine Config Architecture " + i,
                        Host     = "Machine Config Host " + i,
                        Lang     = "Machine Config Language " + i,
                        Location = DbGeography.FromText(string.Format("POINT ({0}.0 {0}.0)", i), 4326),
                        OS       = "Machine Config Operating System " + i % 5,
                        Failures = new List <ArubaFailure>(),
                    };
                    configs[i] = machineConfig;
                }
            }

            return(configs);
        }
Пример #2
0
        private ArubaConfig[] InitializeConfigs()
        {
            var configs = new ArubaConfig[EntitiesCount];
            for (var i = 0; i < EntitiesCount; i++)
            {
                if (i % 2 == 0)
                {
                    var config = new ArubaConfig
                    {
                        Arch = "Config Architecture " + i % 3,
                        Lang = "Config Language" + i,
                        OS = "Config Operating System" + i,
                        Failures = new List<ArubaFailure>(),
                    };
                    configs[i] = config;
                }
                else
                {
                    var machineConfig = new ArubaMachineConfig
                    {
                        Address = new Guid(new string((char)((i % 8) + '0'), 32)),
                        Arch = "Machine Config Architecture " + i,
                        Host = "Machine Config Host " + i,
                        Lang = "Machine Config Language " + i,
                        Location = DbGeography.FromText(string.Format("POINT ({0}.0 {0}.0)", i), 4326),
                        OS = "Machine Config Operating System " + i % 5,
                        Failures = new List<ArubaFailure>(),
                    };
                    configs[i] = machineConfig;
                }
            }

            return configs;
        }