{
CheckIfDisposed();
- Guid schemaGuid = Guid.Empty;
-
if (isBound)
{
if (_schemaGuidBinaryForm == null)
{
CheckIfDisposed();
- Guid schemaGuid = Guid.Empty;
-
if (isBound)
{
if (_schemaGuidBinaryForm == null)
if (existing)
{
// for existing site, nTDSSiteSettings needs to exist
- DirectoryEntry tmp = NTDSSiteEntry;
+ _ = NTDSSiteEntry;
}
_topologyTouched = true;
if (count > 0)
{
Debug.Assert(val != (IntPtr)0);
- int status = Marshal.ReadInt32(val);
IntPtr tmpPtr = (IntPtr)0;
for (int i = 0; i < count; i++)
{
try
{
- string entryName = (string)rootEntry.Properties["distinguishedName"].Value;
// Search for computer "serviceConnectionObjects" where the keywords attribute
// contains the specified keyword
// set up the searcher object
DirectoryEntry serverEntry = directoryEntryMgr.GetCachedDirectoryEntry(serverName);
// force binding (needed otherwise S.DS throw an exception while releasing the COM interface pointer)
- string dn = (string)PropertyManager.GetPropertyValue(context, serverEntry, PropertyManager.DistinguishedName);
+ _ = (string)PropertyManager.GetPropertyValue(context, serverEntry, PropertyManager.DistinguishedName);
// move the object to the servers container of the target site
serverEntry.MoveTo(newParentEntry);
{
throw ExceptionHelper.GetExceptionFromCOMException(context, e);
}
- DirectoryContext schemaContext = Utils.GetNewDirectoryContext(Name, DirectoryContextType.DirectoryServer, context);
+ _ = Utils.GetNewDirectoryContext(Name, DirectoryContextType.DirectoryServer, context);
_schema = new ActiveDirectorySchema(context, schemaNC);
}
throw ExceptionHelper.GetExceptionFromErrorCode(Marshal.GetLastWin32Error());
}
NativeMethods.DsUnBind dsUnBind = (NativeMethods.DsUnBind)Marshal.GetDelegateForFunctionPointer(functionPtr, typeof(NativeMethods.DsUnBind));
- int result = dsUnBind(ref dsHandle);
+ _ = dsUnBind(ref dsHandle);
}
}
throw ExceptionHelper.GetExceptionFromCOMException(context, e);
}
- string crossRefDN = (string)PropertyManager.GetSearchResultPropertyValue(res, PropertyManager.DistinguishedName);
+ _ = (string)PropertyManager.GetSearchResultPropertyValue(res, PropertyManager.DistinguishedName);
return res.GetDirectoryEntry();
}
}
}
- string[] propertiesToLoad2 = new string[5];
-
ADSearcher searcher2 = new ADSearcher(searchRootEntry, filter2, Array.Empty<string>(), SearchScope.Subtree);
SearchResultCollection resCol = null;
bool needToContinueRangeRetrieval = false;
DirectoryEntry entryToUse = _entry.CloneBrowsable();
entryToUse.FillCache("");
- UnsafeNativeMethods.IAdsPropertyList propList = (UnsafeNativeMethods.IAdsPropertyList)entryToUse.AdsObject;
+ _ = (UnsafeNativeMethods.IAdsPropertyList)entryToUse.AdsObject;
entryToUse.propertiesAlreadyEnumerated = true;
return new PropertyEnumerator(_entry, entryToUse);