<Type Name="EnvironmentPermissionAttribute" FullName="System.Security.Permissions.EnvironmentPermissionAttribute" FullNameSP="System_Security_Permissions_EnvironmentPermissionAttribute" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public sealed serializable EnvironmentPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" />
  <TypeSignature Language="C#" Value="public sealed class EnvironmentPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit EnvironmentPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" />
  <MemberOfLibrary>BCL</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.Security.Permissions.CodeAccessSecurityAttribute</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
      <para>Used to declaratively specify security actions to control
      access to environment variables.</para>
    </summary>
    <remarks>
      <para>Environment variable names are case-insensitive. Multiple environment variable names are specified by separating the names
      using the <see cref="F:System.IO.Path.PathSeparator" />
      string.</para>
      <block subset="none" type="note">
        <para> The level of access to one or more environment variables is
         specified using the members of the current instance. For example, to specify
         read permissions for an environment variable, set the <see cref="P:System.Security.Permissions.EnvironmentPermissionAttribute.Read" /> property equal
         to the name of the environment variable.</para>
        <para> The security information declared by a security attribute is stored in the
         metadata of the attribute target, and is accessed by the system at run-time.
         Security attributes are used for declarative security only. For imperative
         security, use the corresponding permission class, <see cref="T:System.Security.Permissions.EnvironmentPermission" />
         .</para>
        <para>The allowable <see cref="T:System.Security.Permissions.EnvironmentPermissionAttribute" /> targets are determined by the
   <see cref="T:System.Security.Permissions.SecurityAction" /> passed to the constructor.</para>
      </block>
    </remarks>
    <example>
      <para> The following example shows a declarative request for
      the ability to read the specified environment variables. The <see cref="F:System.Security.Permissions.SecurityAction.RequestMinimum" />
      security action indicates
      that this is the minimum permission required for the target assembly to be able
      to execute.</para>
      <para>
        <c>[assembly:EnvironmentPermissionAttribute(SecurityAction.RequestMinimum, Read="COMPUTERNAME;USERNAME;USERDOMAIN")]
   </c>
      </para>
      <para>The following example shows how to demand that the
      calling code has unrestricted access to all environment variables. Demands are
      typically made in managed libraries to protect methods or classes from
      malicious code.</para>
      <para>
        <c>[EnvironmentPermissionAttribute(SecurityAction.Demand, Unrestricted=true)]
   </c>
      </para>
    </example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.SecurityAction action)" />
      <MemberSignature Language="C#" Value="public EnvironmentPermissionAttribute (System.Security.Permissions.SecurityAction action);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Security.Permissions.SecurityAction action) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters>
        <Parameter Name="action" Type="System.Security.Permissions.SecurityAction" />
      </Parameters>
      <Docs>
        <param name="action">A <see cref="T:System.Security.Permissions.SecurityAction" /> value.</param>
        <summary>
          <para>Constructs and initializes a new instance of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAttribute" /> class
 with the specified <see cref="T:System.Security.Permissions.SecurityAction" /> value.</para>
        </summary>
        <remarks>To be added.</remarks>
        <exception cref="T:System.ArgumentException">
          <paramref name="action" /> is not a valid <see cref="T:System.Security.Permissions.SecurityAction" /> value. </exception>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="All">
      <MemberSignature Language="C#" Value="public string All { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string All" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="CreatePermission">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission CreatePermission()" />
      <MemberSignature Language="C#" Value="public override System.Security.IPermission CreatePermission ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission CreatePermission() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Security.IPermission</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Returns a new 
   <see cref="T:System.Security.Permissions.EnvironmentPermission" /> that
      contains the security information of the current instance.</para>
        </summary>
        <returns>
          <para>A new <see cref="T:System.Security.Permissions.EnvironmentPermission" />
object with the security information of the current
instance.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para>Applications typically do not call this method; it is intended for use by the
         system.</para>
            <para>The security information described by a security attribute is stored in the
         metadata of the attribute target, and is accessed by the system at run-time. The
         system uses the object returned by this method to convert the security
         information of the current instance into the form stored in metadata.</para>
            <para>This method overrides <see cref="M:System.Security.Permissions.SecurityAttribute.CreatePermission" />.</para>
          </block>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Read">
      <MemberSignature Language="ILASM" Value=".property string Read { public hidebysig specialname instance string get_Read() public hidebysig specialname instance void set_Read(string value) }" />
      <MemberSignature Language="C#" Value="public string Read { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Read" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets or sets the environment variables for which read access is
 secured.</para>
        </summary>
        <value>
          <para> A <see cref="T:System.String" />
containing one or more environment variables for which read access is secured.</para>
        </value>
        <remarks>
          <para>Multiple environment variable names are specified by separating the names
 using the <see cref="F:System.IO.Path.PathSeparator" /> string. Environment variable names are
 case-insensitive.</para>
          <para>
            <block subset="none" type="note">The security action passed to the constructor of the current instance determines how
 the specified environment variables are secured. For example, if the action is
 <see cref="F:System.Security.Permissions.SecurityAction.RequestMinimum" /> , then the target
 of the current instance requires read access to the specified variables in order to
 execute. If the action is <see cref="F:System.Security.Permissions.SecurityAction.RequestRefuse" />, then the
 system does not allow the target to read the specified
 variables.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Write">
      <MemberSignature Language="ILASM" Value=".property string Write { public hidebysig specialname instance string get_Write() public hidebysig specialname instance void set_Write(string value) }" />
      <MemberSignature Language="C#" Value="public string Write { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Write" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets or sets
 the environment variables for which write access is secured.</para>
        </summary>
        <value>
          <para> A <see cref="T:System.String" /> containing one or more environment variables for which write access is secured.</para>
        </value>
        <remarks>
          <para>Multiple environment variable names are specified by separating the names
 using the <see cref="F:System.IO.Path.PathSeparator" /> string. Environment variable names are
 case-insensitive.</para>
          <para>
            <block subset="none" type="note">The security action passed to the
 constructor of the current instance determines how the specified environment
 variables are secured. For example, if the action is <see cref="F:System.Security.Permissions.SecurityAction.RequestMinimum" /> , then the target of
 the current instance requires write access to the specified variables in order
 to execute. If the action is <see cref="F:System.Security.Permissions.SecurityAction.RequestRefuse" />,
 then the system does not allow the target to write the specified
 variables.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
