public void RaiseForestFunctionality(ForestMode forestMode) { CheckIfDisposed(); // check if forest mode is a valid enum value if (forestMode < ForestMode.Windows2000Forest) { throw new InvalidEnumArgumentException(nameof(forestMode), (int)forestMode, typeof(ForestMode)); } if (forestMode <= ForestMode) { throw new ArgumentException(SR.InvalidMode, nameof(forestMode)); } RaiseForestFunctionalityLevel((int)forestMode); }
public void RaiseForestFunctionality(ForestMode forestMode) { this.CheckIfDisposed(); if (forestMode < ForestMode.Windows2000Forest || forestMode > ForestMode.Windows8Forest) { throw new InvalidEnumArgumentException("forestMode", (int)forestMode, typeof(ForestMode)); } else { if (forestMode > this.GetForestMode()) { DirectoryEntry directoryEntry = DirectoryEntryManager.GetDirectoryEntry(this.context, this.directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.PartitionsContainer)); try { try { directoryEntry.Properties[PropertyManager.MsDSBehaviorVersion].Value = (int)forestMode; directoryEntry.CommitChanges(); } catch (COMException cOMException1) { COMException cOMException = cOMException1; if (cOMException.ErrorCode != -2147016694) { throw ExceptionHelper.GetExceptionFromCOMException(this.context, cOMException); } else { throw new ArgumentException(Res.GetString("NoW2K3DCsInForest"), "forestMode"); } } } finally { directoryEntry.Dispose(); } this.currentForestMode = ForestMode.Windows2003InterimForest | ForestMode.Windows2003Forest | ForestMode.Windows2008Forest | ForestMode.Windows2008R2Forest | ForestMode.Windows8Forest; return; } else { throw new ArgumentException(Res.GetString("InvalidMode"), "forestMode"); } } }
internal Forest(DirectoryContext context, string forestDnsName, DirectoryEntryManager directoryEntryMgr) { this.dsHandle = IntPtr.Zero; this.authIdentity = IntPtr.Zero; this.currentForestMode = ForestMode.Windows2003InterimForest | ForestMode.Windows2003Forest | ForestMode.Windows2008Forest | ForestMode.Windows2008R2Forest | ForestMode.Windows8Forest | ForestMode.Windows2012Forest; this.context = context; this.directoryEntryMgr = directoryEntryMgr; this.forestDnsName = forestDnsName; }
public void RaiseForestFunctionality (ForestMode forestMode) { throw new NotImplementedException (); }
public void RaiseForestFunctionality(ForestMode forestMode) {}
public void RaiseForestFunctionality(ForestMode forestMode) { }
public void RaiseForestFunctionality(ForestMode forestMode) { throw new NotImplementedException(); }
public void RaiseForestFunctionality(ForestMode forestMode) { CheckIfDisposed(); // check if forest mode is a valid enum value if (forestMode < ForestMode.Windows2000Forest) { throw new InvalidEnumArgumentException("forestMode", (int)forestMode, typeof(ForestMode)); } if (forestMode <= ForestMode) { throw new ArgumentException(Res.GetString(Res.InvalidMode), "forestMode"); } RaiseForestFunctionalityLevel((int)forestMode); }