コード例 #1
0
 internal ContextInformation GetOriginalContext(IConfigurationContextProviderInternal owner)
 {
     if (this.reset)
     {
         return(this.inheritedContext);
     }
     return(ConfigurationHelpers.GetEvaluationContext(owner));
 }
コード例 #2
0
 internal ContextInformation GetOriginalContext(IConfigurationContextProviderInternal owner)
 {
     if (this.reset)
     {
         // if reset, inherited context is authoritative, even if null
         return(this.inheritedContext);
     }
     else
     {
         // otherwise use current
         return(ConfigurationHelpers.GetEvaluationContext(owner));
     }
 }
コード例 #3
0
 internal static ContextInformation GetEvaluationContext(IConfigurationContextProviderInternal provider)
 {
     if (provider != null)
     {
         try
         {
             return(provider.GetEvaluationContext());
         }
         catch (ConfigurationErrorsException)
         {
         }
     }
     return(null);
 }
コード例 #4
0
 internal static ContextInformation GetOriginalEvaluationContext(IConfigurationContextProviderInternal provider)
 {
     if (provider != null)
     {
         // provider may not need this try/catch, but it doesn't hurt to do it
         try
         {
             return(provider.GetOriginalEvaluationContext());
         }
         catch (ConfigurationErrorsException)
         {
         }
     }
     return(null);
 }
コード例 #5
0
 internal ContextInformation GetOriginalContext(IConfigurationContextProviderInternal owner)
 {
     if (this.reset)
     {
         // if reset, inherited context is authoritative, even if null
         return this.inheritedContext;
     }
     else
     {
         // otherwise use current
         return ConfigurationHelpers.GetEvaluationContext(owner);
     }
 }
コード例 #6
0
 internal static ContextInformation GetOriginalEvaluationContext(IConfigurationContextProviderInternal provider)
 {
     if (provider != null)
     {
         // provider may not need this try/catch, but it doesn't hurt to do it
         try
         {
             return provider.GetOriginalEvaluationContext();
         }
         catch (ConfigurationErrorsException)
         {
         }
     }
     return null;
 }
コード例 #7
0
 internal static ContextInformation GetEvaluationContext(IConfigurationContextProviderInternal provider)
 {
     if (provider != null)
     {
         try
         {
             return provider.GetEvaluationContext();
         }
         catch (ConfigurationErrorsException)
         {
         }
     }
     return null;
 }