a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
137 lines
12 KiB
XML
137 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Type Name="SemaphoreAccessRule" FullName="System.Security.AccessControl.SemaphoreAccessRule">
|
|
<TypeSignature Language="C#" Value="public sealed class SemaphoreAccessRule : System.Security.AccessControl.AccessRule" />
|
|
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit SemaphoreAccessRule extends System.Security.AccessControl.AccessRule" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>System</AssemblyName>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Base>
|
|
<BaseTypeName>System.Security.AccessControl.AccessRule</BaseTypeName>
|
|
</Base>
|
|
<Interfaces />
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> class is one of a set of classes that the .NET Framework provides for managing Windows access control security on named system semaphores. For an overview of these classes, and their relationship to the underlying Windows access control structures, see <see cref="T:System.Security.AccessControl.SemaphoreSecurity" />.</para>
|
|
<block subset="none" type="note">
|
|
<para>Windows access control security is meaningful only for named system semaphores. If a <see cref="T:System.Threading.Semaphore" /> object represents a local semaphore, access control is irrelevant.</para>
|
|
</block>
|
|
<para>To get a list of the rules currently applied to a named semaphore, use the <see cref="M:System.Threading.Semaphore.GetAccessControl" /> method to get a <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> object, then use its <see cref="M:System.Security.AccessControl.CommonObjectSecurity.GetAccessRules(System.Boolean,System.Boolean,System.Type)" /> method to obtain a collection of <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> objects.</para>
|
|
<para>
|
|
<see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> objects do not map one-to-one with access control entries in the underlying discretionary access control list (DACL). When you get the set of all access rules for a semaphore, the set contains the minimum number of rules currently required to express all the access control entries. </para>
|
|
<block subset="none" type="note">
|
|
<para>The underlying access control entries change as you apply and remove rules. The information in rules is merged if possible, to maintain the smallest number of access control entries. Thus, when you read the current list of rules, it might not look exactly like the list of all the rules you have added.</para>
|
|
</block>
|
|
<para>Use <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> objects to specify access rights to allow or deny to a user or group. A <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> object always represents either allowed access or denied access, never both.</para>
|
|
<para>To apply a rule to a named system semaphore, use the <see cref="M:System.Threading.Semaphore.GetAccessControl" /> method to get the <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> object. Modify the <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> object by using its methods to add the rule, and then use the <see cref="M:System.Threading.Semaphore.SetAccessControl(System.Security.AccessControl.SemaphoreSecurity)" /> method to reattach the security object.</para>
|
|
<block subset="none" type="note">
|
|
<para>Changes you make to a <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> object do not affect the access levels of the named semaphore until you call the <see cref="M:System.Threading.Semaphore.SetAccessControl(System.Security.AccessControl.SemaphoreSecurity)" /> method to assign the altered security object to the named semaphore.</para>
|
|
</block>
|
|
<para>
|
|
<see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> objects are immutable. Security for a semaphore is modified using the methods of the <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> class to add or remove rules; as you do this, the underlying access control entries are modified. </para>
|
|
<block subset="none" type="note">
|
|
<para>Security on synchronization objects is not supported for Windows 98 or Windows Millennium Edition.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited.</para>
|
|
</summary>
|
|
</Docs>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public SemaphoreAccessRule (System.Security.Principal.IdentityReference identity, System.Security.AccessControl.SemaphoreRights semaphoreRights, System.Security.AccessControl.AccessControlType type);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Security.Principal.IdentityReference identity, valuetype System.Security.AccessControl.SemaphoreRights semaphoreRights, valuetype System.Security.AccessControl.AccessControlType type) cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Parameters>
|
|
<Parameter Name="identity" Type="System.Security.Principal.IdentityReference" />
|
|
<Parameter Name="semaphoreRights" Type="System.Security.AccessControl.SemaphoreRights" />
|
|
<Parameter Name="type" Type="System.Security.AccessControl.AccessControlType" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="semaphoreRights">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>To enter a <see cref="T:System.Threading.Semaphore" />, for example by calling the <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> method, a user must have <see cref="F:System.Security.AccessControl.SemaphoreRights.Synchronize" /> access. To exit the semaphore, by calling the <see cref="M:System.Threading.Semaphore.Release" /> method, the user must have <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" /> access.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</para>
|
|
</summary>
|
|
<param name="identity">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
|
|
<param name="type">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public SemaphoreAccessRule (string identity, System.Security.AccessControl.SemaphoreRights semaphoreRights, System.Security.AccessControl.AccessControlType type);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string identity, valuetype System.Security.AccessControl.SemaphoreRights semaphoreRights, valuetype System.Security.AccessControl.AccessControlType type) cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Parameters>
|
|
<Parameter Name="identity" Type="System.String" />
|
|
<Parameter Name="semaphoreRights" Type="System.Security.AccessControl.SemaphoreRights" />
|
|
<Parameter Name="type" Type="System.Security.AccessControl.AccessControlType" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="semaphoreRights">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>To enter a <see cref="T:System.Threading.Semaphore" />, for example by calling the <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> method, a user must have <see cref="F:System.Security.AccessControl.SemaphoreRights.Synchronize" /> access. To exit the semaphore, by calling the <see cref="M:System.Threading.Semaphore.Release" /> method, the user must have <see cref="F:System.Security.AccessControl.SemaphoreRights.Modify" /> access.</para>
|
|
<para>This constructor is equivalent to creating an <see cref="T:System.Security.Principal.NTAccount" /> object, by passing <paramref name="identity" /> to the <see cref="M:System.Security.Principal.NTAccount.#ctor(System.String)" /> constructor, and passing the newly created <see cref="T:System.Security.Principal.NTAccount" /> object to the <see cref="M:System.Security.AccessControl.SemaphoreAccessRule.#ctor(System.Security.Principal.IdentityReference,System.Security.AccessControl.SemaphoreRights,System.Security.AccessControl.AccessControlType)" /> constructor.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</para>
|
|
</summary>
|
|
<param name="identity">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The name of the user or group the rule applies to.</param>
|
|
<param name="type">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="SemaphoreRights">
|
|
<MemberSignature Language="C#" Value="public System.Security.AccessControl.SemaphoreRights SemaphoreRights { get; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Security.AccessControl.SemaphoreRights SemaphoreRights" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Security.AccessControl.SemaphoreRights</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="T:System.Security.AccessControl.SemaphoreAccessRule" /> objects are immutable. You can create a new access rule representing a different user, different rights, or a different <see cref="T:System.Security.AccessControl.AccessControlType" />, but you cannot modify an existing access rule.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets the rights allowed or denied by the access rule.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |