public GraphNode Locate(DomainKey domain) { if (data.ContainsKey(domain)) { return(data[domain]); } return(null); }
public GraphNode(int Id, DomainKey Domain, DateTime ReferenceDate) { //Trace.WriteLine("Creating " + Domain); this.Id = Id; this.Domain = Domain; this.ReferenceDate = ReferenceDate; Trusts = new Dictionary <DomainKey, GraphEdge>(); }
public bool HasDomainAmbigiousName(DomainKey domainKey) { if (AmbigiousNameReference.ContainsKey(domainKey.DomainName)) { return(AmbigiousNameReference[domainKey.DomainName].Count > 1); } return(true); }
public void SetForest(DomainKey forest) { // compatibility with older report without forest information if (String.IsNullOrEmpty(forest.DomainName)) { return; } if (forest != null && Forest == null) { Forest = forest; } }
// SID is suppose to identify uniquely a domain // but we cannot guarantee that it is here (for example domain removed or firewalled) public GraphNode CreateNodeIfNeeded(ref int number, DomainKey Domain, string NetBiosName, DateTime ReferenceDate) { GraphNode output = null; if (!data.ContainsKey(Domain)) { output = new GraphNode(number++, Domain, NetBiosName, ReferenceDate); data[Domain] = output; } else { output = data[Domain]; } return(output); }
protected string PrintDomain(DomainKey key) { string label = key.DomainName; if (GetUrlCallback == null) { return(label); } string htmlData = GetUrlCallback(key, label); if (String.IsNullOrEmpty(htmlData)) { return(label); } return(htmlData); }
public void EnrichForestInformation() { if (Forest != null) { return; } foreach (var trust in Trusts.Keys) { if ((Trusts[trust].TrustAttributes & 32) != 0) { if (Trusts[trust].Destination.Forest != null) { Forest = Trusts[trust].Destination.Forest; continue; } } } }
public HealthcheckData GetDomain(DomainKey key) { if (key.DomainSID != null) { if (data.ContainsKey(key.DomainSID)) { return(data[key.DomainSID]); } return(null); } foreach (HealthcheckData hc in data.Values) { if (String.Equals(hc.DomainFQDN, key.DomainName, StringComparison.InvariantCultureIgnoreCase)) { return(hc); } } return(null); }
private void UpdateAmbigiousReference(DomainKey domain) { if (domain == null || String.IsNullOrEmpty(domain.DomainSID) || String.IsNullOrEmpty(domain.DomainName)) { return; } if (!AmbigiousNameReference.ContainsKey(domain.DomainName)) { AmbigiousNameReference[domain.DomainName] = new List <string> { domain.DomainSID } } ; else if (!String.IsNullOrEmpty(domain.DomainSID)) { if (!AmbigiousNameReference[domain.DomainName].Contains(domain.DomainSID)) { AmbigiousNameReference[domain.DomainName].Add(domain.DomainSID); } } }
public GraphNode GetDomain(string center) { DomainKey key = new DomainKey(center, null, null); return(Locate(key)); }