Пример #1
0
        public static bool GetBoolenValue(this LdapObject dict, string key)
        {
            var val = dict.TryGetValue(key, out var value) ? value as string : null;

            bool.TryParse(val, out var result);

            return(result);
        }
Пример #2
0
        public static int?GetIntegerValue(this LdapObject dict, string key)
        {
            var val  = GetStringValue(dict, key);
            var numb = 0;

            if (Int32.TryParse(val, out numb))
            {
                return(numb);
            }

            return(null);
        }
Пример #3
0
 public static object GetValue(this LdapObject dict, string key)
 {
     return(dict.TryGetValue(key, out var value) ? value : null);
 }
Пример #4
0
 public static string[] GetStringArrayValue(this LdapObject dict, string key)
 {
     return(dict.TryGetValue(key, out var value) ? (value as string[]) : null);
 }
Пример #5
0
 public static string GetStringValue(this LdapObject dict, string key)
 {
     return(dict.Properties.TryGetValue(key, out var value) ? value as string : null);
 }