Пример #1
0
 public bool HasDomainAmbigiousName(DomainKey domainKey)
 {
     if (AmbigiousNameReference.ContainsKey(domainKey.DomainName))
     {
         return(AmbigiousNameReference[domainKey.DomainName].Count > 1);
     }
     return(true);
 }
 public bool HasDomainAmbigiousName(DomainKey domainKey)
 {
     if (domainKey == null || string.IsNullOrEmpty(domainKey.DomainName))
     {
         return(false);
     }
     if (AmbigiousNameReference.ContainsKey(domainKey.DomainName))
     {
         return(AmbigiousNameReference[domainKey.DomainName].Count > 1);
     }
     return(true);
 }
 public T GetDomain(DomainKey key)
 {
     if (key == null)
     {
         return(default(T));
     }
     if (key.DomainSID != null)
     {
         if (data.ContainsKey(key.DomainSID))
         {
             return(data[key.DomainSID]);
         }
         return(default(T));
     }
     foreach (T hc in data.Values)
     {
         if (string.Equals(hc.Domain.DomainName, key.DomainName, StringComparison.InvariantCultureIgnoreCase))
         {
             return(hc);
         }
     }
     return(default(T));
 }