// Token: 0x06001673 RID: 5747 RVA: 0x00054EB4 File Offset: 0x000530B4 private void MarkDcDownIfNecessary(GenericEventArg <TaskErrorEventArg> e) { if (e.Data.ExceptionHandled) { return; } ADDriverContext threadADContext = ADSessionSettings.GetThreadADContext(); ADServerSettings adserverSettings = (threadADContext != null) ? threadADContext.ServerSettings : null; if (this.context == null || adserverSettings == null) { return; } string text = null; for (Exception ex = e.Data.Exception; ex != null; ex = ex.InnerException) { if (ex is SuitabilityDirectoryException) { text = ((SuitabilityDirectoryException)ex).Fqdn; break; } if (ex is ServerInMMException) { text = ((ServerInMMException)ex).Fqdn; break; } if (ex is ADServerSettingsChangedException) { ADServerSettings serverSettings = ((ADServerSettingsChangedException)ex).ServerSettings; this.PersistNewServerSettings(serverSettings); break; } if (ex == ex.InnerException) { break; } } if (string.IsNullOrWhiteSpace(text)) { return; } Fqdn fqdn; if (Fqdn.TryParse(text, out fqdn)) { try { adserverSettings.MarkDcDown(fqdn); CmdletLogger.SafeAppendGenericInfo(this.context.UniqueId, "MarkDcDown", fqdn); return; } catch (NotSupportedException) { CmdletLogger.SafeAppendGenericInfo(this.context.UniqueId, "MarkDcDown-NotSupportedException", fqdn); return; } } CmdletLogger.SafeAppendGenericInfo(this.context.UniqueId, "MarkDcDown-InvalidFqdn", fqdn); }
// Token: 0x06000FAD RID: 4013 RVA: 0x0003FF60 File Offset: 0x0003E160 private static Fqdn ServerAttributeToFqdn(string attributeName, string attributeValue) { Fqdn result; if (!Fqdn.TryParse(attributeValue, out result)) { throw new XmlException(string.Format(CultureInfo.InvariantCulture, "Invalid response received from ESS service: The attribute [{0}] has an unhandled value: {1}.", new object[] { attributeName, attributeValue })); } return(result); }
internal static string GetConfigurationDomainControllerFqdn(string domainController) { if (string.IsNullOrEmpty(domainController)) { return(ADSession.GetCurrentConfigDCForLocalForest()); } Fqdn fqdn; if (!Fqdn.TryParse(domainController, out fqdn) || 0 >= domainController.IndexOf('.')) { domainController = Dns.GetHostEntry(domainController).HostName; } return(domainController); }
internal static bool TryParseDBMountedOnServerHeader(string headerValue, out Guid mdbGuid, out Fqdn serverFqdn, out int serverVersion) { mdbGuid = default(Guid); serverFqdn = null; serverVersion = 0; if (string.IsNullOrEmpty(headerValue)) { return(false); } string[] array = headerValue.Split(new char[] { '~' }); return(array.Length == 3 && Guid.TryParse(array[0], out mdbGuid) && Fqdn.TryParse(array[1], out serverFqdn) && int.TryParse(array[2], out serverVersion) && serverVersion != 0); }
public static bool TryExtractForestFqdnFromServerFqdn(string serverFqdn, out string forestFqdn) { forestFqdn = string.Empty; Fqdn fqdn; if (!Fqdn.TryParse(serverFqdn, out fqdn)) { return(false); } int num = serverFqdn.IndexOf('.'); if (num < 0) { return(false); } forestFqdn = serverFqdn.Substring(num + 1); return(true); }
// Token: 0x060007E8 RID: 2024 RVA: 0x0001D0EC File Offset: 0x0001B2EC protected AccountPartitionIdParameter(string identity) : base(identity) { Fqdn.TryParse(identity, out this.fqdn); }