dotnet / dotnet/dotnet-api-docs

"InvokeSet should not be used"

Open
#922 3 comments 0 reactions 0 assignees View on GitHub
area-System.DirectoryServices dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

InvokeSet is the only way I can see that allows you to set the value of an attribute that currently has no value. The Properties collection can only be used to update attributes that have a value. Even if you specify additional properties to return in the DirectorySearcher, the entry will not contain them and there is no way to set them.

There is a method "Add" but you cannot use it because the collection is a fixed size.

If there is a better way for this scenario, the documentation should specify how because InvokeSet is the only way I can see to do it...

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 1db88fe4-b886-0ba0-6d0a-08abc2e836ac
* Version Independent ID: 88779c68-f022-dcbc-d242-7e9c2be1bd07
* Content: [DirectoryEntry.InvokeSet(String, Object\[\]) Method (System.DirectoryServices)](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry.invokeset?redirectedfrom=MSDN&view=netframework-4.7.2#System_DirectoryServices_DirectoryEntry_InvokeSet_System_String_System_Object___)
* Content Source: [xml/System.DirectoryServices/DirectoryEntry.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.DirectoryServices/DirectoryEntry.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.