public static void Domains(Domain _) { if (_domainsOutput.IsCompleted) { _domainsOutput = new BlockingCollection <JsonBase>(); _domainsWriter = Extensions.StartOutputWriter(_domainsOutput); } _domainsOutput.Add(new Models.BloodHound.Domain { Name = _.Id }); }
/// <summary> /// Creates the specified Domain using POST. /// </summary> /// <param name="domainToCreate">The Domain to create.</param> /// <returns>The created Domain.</returns> public System.Threading.Tasks.Task<Domain> CreateAsync(Domain domainToCreate) { return this.CreateAsync(domainToCreate, CancellationToken.None); }
/// <summary> /// Updates the specified Domain using PATCH. /// </summary> /// <param name="domainToUpdate">The Domain to update.</param> /// <returns>The updated Domain.</returns> public System.Threading.Tasks.Task <Domain> UpdateAsync(Domain domainToUpdate) { return(this.UpdateAsync(domainToUpdate, CancellationToken.None)); }
/// <summary> /// Initializes any collection properties after deserialization, like next requests for paging. /// </summary> /// <param name="domainToInitialize">The <see cref="Domain"/> with the collection properties to initialize.</param> private void InitializeCollectionProperties(Domain domainToInitialize) { if (domainToInitialize != null && domainToInitialize.AdditionalData != null) { if (domainToInitialize.DomainNameReferences != null && domainToInitialize.DomainNameReferences.CurrentPage != null) { domainToInitialize.DomainNameReferences.AdditionalData = domainToInitialize.AdditionalData; object nextPageLink; domainToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink); var nextPageLinkString = nextPageLink as string; if (!string.IsNullOrEmpty(nextPageLinkString)) { domainToInitialize.DomainNameReferences.InitializeNextPageRequest( this.Client, nextPageLinkString); } } if (domainToInitialize.ServiceConfigurationRecords != null && domainToInitialize.ServiceConfigurationRecords.CurrentPage != null) { domainToInitialize.ServiceConfigurationRecords.AdditionalData = domainToInitialize.AdditionalData; object nextPageLink; domainToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink); var nextPageLinkString = nextPageLink as string; if (!string.IsNullOrEmpty(nextPageLinkString)) { domainToInitialize.ServiceConfigurationRecords.InitializeNextPageRequest( this.Client, nextPageLinkString); } } if (domainToInitialize.SharedEmailDomainInvitations != null && domainToInitialize.SharedEmailDomainInvitations.CurrentPage != null) { domainToInitialize.SharedEmailDomainInvitations.AdditionalData = domainToInitialize.AdditionalData; object nextPageLink; domainToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink); var nextPageLinkString = nextPageLink as string; if (!string.IsNullOrEmpty(nextPageLinkString)) { domainToInitialize.SharedEmailDomainInvitations.InitializeNextPageRequest( this.Client, nextPageLinkString); } } if (domainToInitialize.VerificationDnsRecords != null && domainToInitialize.VerificationDnsRecords.CurrentPage != null) { domainToInitialize.VerificationDnsRecords.AdditionalData = domainToInitialize.AdditionalData; object nextPageLink; domainToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink); var nextPageLinkString = nextPageLink as string; if (!string.IsNullOrEmpty(nextPageLinkString)) { domainToInitialize.VerificationDnsRecords.InitializeNextPageRequest( this.Client, nextPageLinkString); } } } }