public static bool IsTenantArriving(ADObjectId identity) { TenantRelocationState tenantRelocationState; bool flag; return(TenantRelocationStateCache.TryGetTenantRelocationStateByObjectId(identity, out tenantRelocationState, out flag) && !flag && tenantRelocationState.TargetForestState <= RelocationStatusDetailsDestination.Arriving && tenantRelocationState.SourceForestState != TenantRelocationStatus.Retired); }
private static bool IsTargetTenantStateInRange(ADObjectId identity, params RelocationStatusDetailsDestination[] states) { TenantRelocationState tenantRelocationState; bool flag; if (TenantRelocationStateCache.TryGetTenantRelocationStateByObjectId(identity, out tenantRelocationState, out flag) && !flag) { foreach (RelocationStatusDetailsDestination relocationStatusDetailsDestination in states) { if (tenantRelocationState.TargetForestState == relocationStatusDetailsDestination) { return(true); } } } return(false); }
private static bool IsSourceTenantStateInRange(ADObjectId identity, params TenantRelocationStatus[] states) { TenantRelocationState tenantRelocationState; bool flag; if (TenantRelocationStateCache.TryGetTenantRelocationStateByObjectId(identity, out tenantRelocationState, out flag) && flag) { foreach (TenantRelocationStatus tenantRelocationStatus in states) { if (tenantRelocationState.SourceForestState == tenantRelocationStatus) { return(true); } } } return(false); }