Example #1
0
 public JobImpactManager(
     IConfigSection configSection,
     IQueryClient queryClient)
 {
     this.configSection = configSection.Validate("configSection");
     this.QueryClient   = queryClient.Validate("queryClient");
 }
        public DynamicRoleInstanceHealthPolicyManager(IConfigSection configSection, string configKeyPrefix)
        {
            configSection.Validate("configSection");

            healthPolicies.Add(new RoleInstanceStatusMapHealthPolicy(configSection, configKeyPrefix));
            healthPolicies.Add(new RoleInstanceStatusMaxAllowedHealthPolicy(configSection, configKeyPrefix));
        }
 public CoordinatorEnvironment(string serviceName, IConfigSection configSection, string baseTraceId, IInfrastructureAgentWrapper infrastructureAgent)
 {
     this.ServiceName         = serviceName.Validate("serviceName");
     this.Config              = configSection.Validate("configSection");
     this.DefaultTraceType    = new TraceType(Constants.TraceTypeName, baseTraceId);
     this.InfrastructureAgent = infrastructureAgent; // allow null for test/tools
 }
Example #4
0
        protected BaseRoleInstanceHealthPolicy(IConfigSection configSection, string configKeyPrefix)
        {
            this.configSection   = configSection.Validate("configSection");
            this.configKeyPrefix = configKeyPrefix.Validate("configKeyPrefix");

            Name = this.GetType().Name.Replace("HealthPolicy", string.Empty);
        }
Example #5
0
        public RoleInstanceHealthWatchdog(IConfigSection configSection, string configKeyPrefix, IHealthClient healthClient)
        {
            this.configSection   = configSection.Validate("configSection");
            this.configKeyPrefix = configKeyPrefix.Validate("configKeyPrefix");
            this.healthClient    = healthClient.Validate("healthClient");

            healthPolicyManager = new DynamicRoleInstanceHealthPolicyManager(configSection, configKeyPrefix);
        }
        private static bool DoesJobRequireHealthCheck(ITenantJob tenantJob, IConfigSection configSection, string keyFormat, bool defaultValue)
        {
            tenantJob.Validate("tenantJob");
            configSection.Validate("configSection");

            var impactAction = tenantJob.GetImpactAction();
            var key          = keyFormat.ToString(impactAction);

            return(configSection.ReadConfigValue(key, defaultValue));
        }
Example #7
0
            public JobTypeCounter(IConfigSection configSection)
            {
                this.configSection = configSection.Validate("configSection");

                InitializeCount(ImpactActionEnum.Unknown, 0);
                InitializeCount(ImpactActionEnum.PlatformMaintenance);
                InitializeCount(ImpactActionEnum.PlatformUpdate);
                InitializeCount(ImpactActionEnum.TenantMaintenance);
                InitializeCount(ImpactActionEnum.TenantUpdate);
            }
Example #8
0
 public DelayLoadCoordinator(
     Func <CoordinatorFactoryArgs, IInfrastructureCoordinator> factory,
     CoordinatorFactoryArgs factoryArgs,
     IHealthClient healthClient,
     IConfigSection configSection)
 {
     this.factory       = factory.Validate("factory");
     this.factoryArgs   = factoryArgs.Validate("factoryArgs");
     this.healthClient  = healthClient.Validate("healthClient");
     this.configSection = configSection.Validate("configSection");
 }
Example #9
0
        public static string GetTenantId(IConfigSection configSection)
        {
            configSection.Validate("configSection");

            string tenantId = configSection.ReadConfigValue <string>("WindowsAzure.TenantID");

            if (string.IsNullOrWhiteSpace(tenantId))
            {
#if DotNetCoreClrLinux
                tenantId = GetTenantIdOnLinux();
#else
                tenantId = GetTenantIdOnWindows();
#endif
            }

            return(tenantId);
        }
 public RoleInstanceHealthWatchdogFactory(IConfigSection configSection, IHealthClient healthClient)
 {
     this.configSection = configSection.Validate("configSection");
     this.healthClient  = healthClient.Validate("healthClient");
 }
        public RepairActionProvider(IConfigSection configSection)
        {
            this.configSection = configSection.Validate("configSection");

            BuildRepairActionMap();
        }
Example #12
0
 public ImpactTranslator(IConfigSection configSection)
 {
     configSection.Validate("configSection");
     this.configSection = configSection;
 }
Example #13
0
 public CoordinatorEnvironment(string serviceName, IConfigSection configSection, string baseTraceId)
 {
     this.ServiceName      = serviceName.Validate("serviceName");
     this.Config           = configSection.Validate("configSection");
     this.DefaultTraceType = new TraceType(Constants.TraceTypeName, baseTraceId);
 }
Example #14
0
 public ConfigReader(IConfigSection configSection)
 {
     this.configSection = configSection.Validate("configSection");
 }