private static IADSite RetrieveLocalSite(IADToplogyConfigurationSession session) { if (ActiveManagerImplementation.cachedLocalSite != null) { if (!(DateTime.UtcNow > ActiveManagerImplementation.localSiteExpiration)) { goto IL_77; } } try { ActiveManagerImplementation.Tracer.TraceDebug(0L, "RetrieveLocalSite: either the local site is null, or it's time to refresh the value."); ActiveManagerImplementation.cachedLocalSite = session.GetLocalSite(); ActiveManagerImplementation.localSiteExpiration = DateTime.UtcNow.Add(ActiveManagerImplementation.c_timeSpanSiteExpiration); } catch (ADTransientException arg) { ActiveManagerImplementation.Tracer.TraceError <ADTransientException>(0L, "GetLocalSite() threw an ADTransientException: {0}", arg); } catch (CannotGetSiteInfoException arg2) { ActiveManagerImplementation.Tracer.TraceError <CannotGetSiteInfoException>(0L, "GetLocalSite() threw a CannotGetSiteInfoException: {0}", arg2); } IL_77: return(ActiveManagerImplementation.cachedLocalSite); }