예제 #1
0
 internal static IGlobalLocatorServiceReader Create(GlsCallerId glsCallerId)
 {
     if (AppConfigGlsReader.AppConfigOverrideExists())
     {
         return(new AppConfigGlsReader());
     }
     return(new LocatorServiceClientReader(glsCallerId));
 }
예제 #2
0
 // Token: 0x06000B99 RID: 2969 RVA: 0x00035297 File Offset: 0x00033497
 public IAsyncResult BeginFindDomains(SmtpDomain[] domains, DomainProperty[] domainProperties, TenantProperty[] tenantProperties, AsyncCallback callback, object asyncState)
 {
     return(AppConfigGlsReader.BeginAsyncOperation(callback, asyncState));
 }
예제 #3
0
 // Token: 0x06000B97 RID: 2967 RVA: 0x00035282 File Offset: 0x00033482
 public IAsyncResult BeginFindTenant(Guid tenantId, TenantProperty[] tenantProperties, AsyncCallback callback, object asyncState)
 {
     return(AppConfigGlsReader.BeginAsyncOperation(callback, asyncState));
 }
예제 #4
0
 // Token: 0x06000B8F RID: 2959 RVA: 0x00035220 File Offset: 0x00033420
 public AppConfigGlsReader()
 {
     AppConfigGlsReader.ParseAndConstructResultObjects(ConfigurationManager.AppSettings["GlsFindDomainOverride"], out this.findDomainResult, out this.findDomainsResult, out this.findTenantResult);
 }
예제 #5
0
        // Token: 0x06000BA1 RID: 2977 RVA: 0x00035328 File Offset: 0x00033528
        private static void ParseAndConstructResultObjects(string rawAppConfigValue, out FindDomainResult findDomainResult, out FindDomainsResult findDomainsResult, out FindTenantResult findTenantResult)
        {
            if (string.IsNullOrEmpty(rawAppConfigValue))
            {
                throw new ArgumentNullException("rawAppConfigValue");
            }
            char[] separator = new char[]
            {
                ' '
            };
            char[] separator2 = new char[]
            {
                ':'
            };
            char[] separator3 = new char[]
            {
                '='
            };
            char[] separator4 = new char[]
            {
                ','
            };
            char[] trimChars = new char[]
            {
                '[',
                ']'
            };
            string[] array = rawAppConfigValue.Split(separator);
            string   text  = array[0];
            string   text2 = array[1];
            string   text3 = array[2];

            string[] array2 = text.Split(separator2);
            string[] array3 = text2.Split(separator2);
            string[] array4 = text3.Split(separator2);
            string   text4  = array2[0];
            string   text5  = array3[0];
            string   text6  = array4[0];
            string   g      = array2[1];
            string   text7  = array3[1];
            string   text8  = array4[1];

            AppConfigGlsReader.Assert(text4.Equals("TenantId", StringComparison.OrdinalIgnoreCase), "incorrect key name for TenantId");
            AppConfigGlsReader.Assert(text5.Equals("TenantProperties", StringComparison.OrdinalIgnoreCase), "incorrect key name for TenantProperties");
            AppConfigGlsReader.Assert(text6.Equals("DomainProperties", StringComparison.OrdinalIgnoreCase), "incorrect key name for DomainProperties");
            Guid tenantId = new Guid(g);
            IDictionary <DomainProperty, PropertyValue> dictionary  = new Dictionary <DomainProperty, PropertyValue>();
            IDictionary <TenantProperty, PropertyValue> dictionary2 = new Dictionary <TenantProperty, PropertyValue>();

            text7 = text7.Trim(trimChars);
            text8 = text8.Trim(trimChars);
            if (text7 != string.Empty)
            {
                string[] array5 = text7.Split(separator4);
                foreach (string text9 in array5)
                {
                    string[]       array7         = text9.Split(separator3);
                    string         name           = array7[0];
                    string         rawStringValue = array7[1];
                    TenantProperty tenantProperty = TenantProperty.Get(name);
                    dictionary2.Add(tenantProperty, PropertyValue.Create(rawStringValue, tenantProperty));
                }
            }
            if (text8 != string.Empty)
            {
                string[] array8 = text8.Split(separator4);
                foreach (string text10 in array8)
                {
                    string[]       array10         = text10.Split(separator3);
                    string         name2           = array10[0];
                    string         rawStringValue2 = array10[1];
                    DomainProperty domainProperty  = DomainProperty.Get(name2);
                    dictionary.Add(domainProperty, PropertyValue.Create(rawStringValue2, domainProperty));
                }
            }
            findDomainResult  = new FindDomainResult("domainName", tenantId, dictionary2, dictionary);
            findDomainsResult = new FindDomainsResult(new FindDomainResult[]
            {
                findDomainResult
            });
            findTenantResult = new FindTenantResult(dictionary2);
        }