public void Ctor_Default() { var control = new ShowDeletedControl(); Assert.True(control.IsCritical); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.417", control.Type); Assert.Empty(control.GetValue()); }
protected void BuildRequest(string searchBase, string ldapFilter, string[] propertiesToLoad, SearchScope scope) { Request = new SearchRequest(searchBase, ldapFilter, scope, propertiesToLoad); Request.TimeLimit = TimeSpan.FromSeconds((double)ForestBase.CurrentTimeOut); if (QueryInfo.PhantomRoot) { Request.DistinguishedName = null; SearchOptionsControl sopcontrol = new SearchOptionsControl(SearchOption.PhantomRoot); Request.Controls.Add(sopcontrol); } if (QueryInfo.PerformDirSync) { Request.TimeLimit = new TimeSpan(0, 10, 0); DirSyncCookie(); } else { if (ASQRequired) { AsqCookie(); } if (QueryInfo.PerformSort) { SortCookie(); } if (QueryInfo.VlvRequired) { VlvControls(); } else if (QueryInfo.PerformPagedQuery) { PageCookie(1000); } StatsCookie(); } if (QueryInfo.ShowDeleted) { ShowDeletedControl showdeleted = new ShowDeletedControl { ServerSide = true }; Request.Controls.Add(showdeleted); } if (QueryInfo.ShowRecycled) { DirectoryControl showrecycled = new DirectoryControl(SHOW_RECYCLED_CONTROL_OID, null, true, true); Request.Controls.Add(showrecycled); } }