internal bool IsLockdownAllowed() { if (TenantRelocationStateCache.IgnoreRelocationTimeConstraints()) { return(true); } DateTime utcNow = DateTime.UtcNow; if (this.RelocationSyncStartTime != null && this.RelocationSyncStartTime.Value.ToUniversalTime() + TimeSpan.FromHours((double)TenantRelocationRequest.MinTimeBetweenRelocationStartAndLockdownHours) > utcNow) { return(false); } if (this.SafeLockdownSchedule == null || this.SafeLockdownSchedule == Schedule.Always) { return(true); } int num = 0; uint num2; if (TenantRelocationSyncCoordinator.GetInt32ValueFromRegistryValue("TimeZoneOffset", out num2)) { num = (int)num2; } return(this.SafeLockdownSchedule.Contains(utcNow.AddHours((double)num))); }
private bool TryReadRegistryHealthOverride(out ResourceLoadState healthValue) { uint num; bool int32ValueFromRegistryValue = TenantRelocationSyncCoordinator.GetInt32ValueFromRegistryValue("ADHealthOverrideForTenantRelocation", out num); if (int32ValueFromRegistryValue) { healthValue = (ResourceLoadState)num; } else { healthValue = ResourceLoadState.Unknown; } return(int32ValueFromRegistryValue); }
private static bool GLSRecordCheckDisabled() { return(TenantRelocationSyncCoordinator.GetInt32ValueFromRegistryValueOrDefault("GLSRecordCheckDisabled", 0U) != 0U); }