示例#1
0
		internal PropertyValue GetDomainPropertyValue(DomainProperty property)
		{
			PropertyValue result;
			if (!this.domainProperties.TryGetValue(property, out result))
			{
				return PropertyValue.Create(null, property);
			}
			return result;
		}
示例#2
0
        internal static IDictionary <DomainProperty, PropertyValue> ConstructDomainPropertyDictionary(KeyValuePair <string, string>[] properties)
        {
            IDictionary <DomainProperty, PropertyValue> dictionary = new Dictionary <DomainProperty, PropertyValue>();

            foreach (KeyValuePair <string, string> keyValuePair in properties)
            {
                DomainProperty domainProperty = DomainProperty.Get(keyValuePair.Key);
                PropertyValue  value          = PropertyValue.Create(keyValuePair.Value, domainProperty);
                dictionary.Add(domainProperty, value);
            }
            return(dictionary);
        }
示例#3
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);
        }