public ActiveDirectoryDomain GetADDomain(string Server)
        {
            GetADDomainRequest getADDomainRequest = new GetADDomainRequest();

            getADDomainRequest.Server = Server;
            GetADDomainResponse aDDomain = this.Channel.GetADDomain(getADDomainRequest);

            return(aDDomain.Domain);
        }
		internal ADObject GetDomain()
		{
			this.Init();
			GetADDomainRequest getADDomainRequest = new GetADDomainRequest();
			GetADDomainResponse aDDomain = this._topoMgmt.GetADDomain(this._sessionHandle, getADDomainRequest);
			if (aDDomain.Domain == null)
			{
				return null;
			}
			else
			{
				ActiveDirectoryDomain domain = aDDomain.Domain;
				ADObject aDObject = new ADObject();

				aDObject.Add("objectGUID", domain.ObjectGuid);
				aDObject.Add("name", domain.Name);
				aDObject.Add("distinguishedName", domain.DistinguishedName);
				aDObject.Add("objectClass", domain.ObjectClass);
				aDObject.Add("msDS-AllowedDNSSuffixes", domain.AllowedDNSSuffixes);
				aDObject.Add("objectSid", new SecurityIdentifier(domain.DomainSID, 0));
				aDObject.Add("msDS-Behavior-Version", (ADDomainMode)domain.DomainMode);
				aDObject.Add("managedBy", domain.ManagedBy);
				aDObject.Add("msDS-LogonTimeSyncInterval", domain.LastLogonReplicationInterval);
				aDObject.Add("SubordinateReferences", domain.SubordinateReferences);
				aDObject.Add("DNSRoot", domain.DNSRoot);
				aDObject.Add("LostAndFoundContainer", domain.LostAndFoundContainer);
				aDObject.Add("DeletedObjectsContainer", domain.DeletedObjectsContainer);
				aDObject.Add("QuotasContainer", domain.QuotasContainer);
				aDObject.Add("ReadOnlyReplicaDirectoryServers", domain.ReadOnlyReplicaDirectoryServer);
				aDObject.Add("ReplicaDirectoryServers", domain.ReplicaDirectoryServer);
				aDObject.Add("LinkedGroupPolicyObjects", domain.AppliedGroupPolicies);
				aDObject.Add("ChildDomains", domain.ChildDomains);
				aDObject.Add("ComputersContainer", domain.ComputersContainer);
				aDObject.Add("DomainControllersContainer", domain.DomainControllersContainer);
				aDObject.Add("ForeignSecurityPrincipalsContainer", domain.ForeignSecurityPrincipalsContainer);
				aDObject.Add("Forest", domain.Forest);
				aDObject.Add("InfrastructureMaster", domain.InfrastructureMaster);
				aDObject.Add("NetBIOSName", domain.NetBIOSName);
				aDObject.Add("PDCEmulator", domain.PDCEmulator);
				aDObject.Add("ParentDomain", domain.ParentDomain);
				aDObject.Add("RIDMaster", domain.RIDMaster);
				aDObject.Add("SystemsContainer", domain.SystemsContainer);
				aDObject.Add("UsersContainer", domain.UsersContainer);
				ADPropertyValueCollection aDPropertyValueCollection = new ADPropertyValueCollection();
				if (domain.ObjectTypes != null) {
					aDPropertyValueCollection.AddRange(domain.ObjectTypes);
				}
				aDObject.ObjectTypes = aDPropertyValueCollection;
				return aDObject;
			}
		}
		GetADDomainResponse Microsoft.ActiveDirectory.Management.IADTopologyManagement.GetADDomain(ADSessionHandle handle, GetADDomainRequest request)
		{
			GetADDomainResponse aDDomain = null;
			AdwsConnection internalHandle = this.GetInternalHandle(handle);
			if (internalHandle != null)
			{
				aDDomain = internalHandle.GetADDomain(request);
			}
			return aDDomain;
		}
 GetADDomainResponse Microsoft.ActiveDirectory.CustomActions.TopologyManagement.GetADDomain(GetADDomainRequest request)
 {
     return(base.Channel.GetADDomain(request));
 }
 public Microsoft.ActiveDirectory.CustomActions.GetADDomainResponse GetADDomain(ADSessionHandle handle, Microsoft.ActiveDirectory.CustomActions.GetADDomainRequest request)
 {
     throw new NotImplementedException();
 }