public void SetDomainFlag(string domainFqdn, GlsDomainFlags flag, bool value) { string address = MServDirectorySession.EntryIdForGlsDomainFlag(domainFqdn, flag); MServDirectorySession.RemoveMserveEntry(address, value ? 0 : 1); MServDirectorySession.AddMserveEntry(address, value ? 1 : 0); }
public bool TryGetDomainFlag(string domainFqdn, GlsDomainFlags flag, out bool value) { bool outValue = false; bool result = this.ExecuteGlobalRead((IGlobalDirectorySession session) => session.TryGetDomainFlag(domainFqdn, flag, out outValue)); value = outValue; return(result); }
public void SetDomainFlag(string domainFqdn, GlsDomainFlags flag, bool value) { this.ExecuteGlobalWrite(delegate(IGlobalDirectorySession session) { session.SetDomainFlag(domainFqdn, flag, value); }, delegate(IGlobalDirectorySession session) { session.SetDomainFlag(domainFqdn, flag, !value); }); }
private static string EntryIdForGlsDomainFlag(string domainFqdn, GlsDomainFlags flag) { switch (flag) { case GlsDomainFlags.Nego2Enabled: return(string.Format("ade5142cfe3d4ff19fed54a7f6087a98@{0}", domainFqdn)); case GlsDomainFlags.OAuth2ClientProfileEnabled: return(string.Format("0f01471e875a455a80c59def2a36ee3f@{0}", domainFqdn)); default: throw new ArgumentOutOfRangeException("flag"); } }
public bool TryGetDomainFlag(string domainFqdn, GlsDomainFlags flag, out bool value) { string address = MServDirectorySession.EntryIdForGlsDomainFlag(domainFqdn, flag); int num = MServDirectorySession.ReadMservEntry(address); if (num == -1) { value = false; } else { value = (num > 0); } return(true); }