﻿<?xml version="1.0" encoding="utf-8"?><Type Name="EnvironmentPermission" FullName="System.Security.Permissions.EnvironmentPermission" FullNameSP="System_Security_Permissions_EnvironmentPermission" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public sealed serializable EnvironmentPermission extends System.Security.CodeAccessPermission" /><TypeSignature Language="C#" Value="public sealed class EnvironmentPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IBuiltInPermission, System.Security.Permissions.IUnrestrictedPermission" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit EnvironmentPermission extends System.Security.CodeAccessPermission implements class System.Security.Permissions.IBuiltInPermission, class System.Security.Permissions.IUnrestrictedPermission" /><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.CodeAccessPermission</BaseTypeName></Base><Interfaces><Interface><InterfaceName>System.Security.Permissions.IBuiltInPermission</InterfaceName></Interface><Interface><InterfaceName>System.Security.Permissions.IUnrestrictedPermission</InterfaceName></Interface></Interfaces><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Environment variable names are designated by one or more case-insensitive name lists separated by semicolons, with separate lists for read and write access to the named variables. Write access includes the ability to create and delete environment variables as well as to change existing values.</para><block subset="none" type="note"><para>In versions of the .NET Framework before the net_v40_long, you could use the <see cref="M:System.Security.CodeAccessPermission.Deny" /> method to prevent inadvertent access to system resources by trusted code. <see cref="M:System.Security.CodeAccessPermission.Deny" /> is now obsolete, and access to resources is now determined solely by the granted permission set for an assembly. To limit access to files, you must run partially trusted code in a sandbox and assign it permissions only to resources that the code is allowed to access. For information about running an application in a sandbox, see <format type="text/html"><a href="d1ad722b-5b49-4040-bff3-431b94bb8095">How To: Run Partially Trusted Code in a Sandbox</a></format>.</para><para /></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Controls access to system and user environment variables. This class cannot be inherited.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.PermissionState state)" /><MemberSignature Language="C#" Value="public EnvironmentPermission (System.Security.Permissions.PermissionState state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Security.Permissions.PermissionState state) 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="state" Type="System.Security.Permissions.PermissionState" /></Parameters><Docs><exception cref="T:System.ArgumentException"><paramref name="state" /> is not a valid <see cref="T:System.Security.Permissions.PermissionState" /> value.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates either fully restricted (None) or Unrestricted access to all environment variables.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Permissions.EnvironmentPermission" /> class with either restricted or unrestricted permission as specified.</para></summary><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.PermissionState" /> values. </param></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList)" /><MemberSignature Language="C#" Value="public EnvironmentPermission (System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) 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="flag" Type="System.Security.Permissions.EnvironmentPermissionAccess" /><Parameter Name="pathList" Type="System.String" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><para><paramref name="pathList" /> is <see langword="null" />. </para></exception><exception cref="T:System.ArgumentException"><para><paramref name="flag" /> specifies a value not defined in <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" />. </para></exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor allows only one of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" /> values to be specified. This access applies to all listed environment variables. Use <see cref="M:System.Security.Permissions.EnvironmentPermission.AddPathList(System.Security.Permissions.EnvironmentPermissionAccess,System.String)" /> to define complex permissions.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Permissions.EnvironmentPermission" /> class with the specified access to the specified environment variables.</para></summary><param name="flag"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" /> values. </param><param name="pathList"><attribution license="cc4" from="Microsoft" modified="false" />A list of environment variables (semicolon-separated) to which access is granted. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="AddPathList"><MemberSignature Language="C#" Value="public void AddPathList (System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPathList(valuetype System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) 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.Void</ReturnType></ReturnValue><Parameters><Parameter Name="flag" Type="System.Security.Permissions.EnvironmentPermissionAccess" /><Parameter Name="pathList" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Use this method to modify environment variable access by adding to the state of the current permission.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Adds access for the specified environment variables to the existing state of the permission.</para></summary><param name="flag"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" /> values. </param><param name="pathList"><attribution license="cc4" from="Microsoft" modified="false" />A list of environment variables (semicolon-separated). </param></Docs></Member><Member MemberName="Copy"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Copy()" /><MemberSignature Language="C#" Value="public override System.Security.IPermission Copy ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Copy() 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><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>A copy of a permission represents the same access to resources as the original permission.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates and returns an identical copy of the current permission.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A copy of the current permission.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="FromXml"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual void FromXml(class System.Security.SecurityElement esd)" /><MemberSignature Language="C#" Value="public override void FromXml (System.Security.SecurityElement esd);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void FromXml(class System.Security.SecurityElement esd) 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.Void</ReturnType></ReturnValue><Parameters><Parameter Name="esd" Type="System.Security.SecurityElement" /></Parameters><Docs><remarks><para>The state of the current instance is changed to the
 state encoded in <paramref name="esd" />.</para><block subset="none" type="note"><para>For the XML encoding for this class, see the <see cref="T:System.Security.Permissions.EnvironmentPermission" /> class
 page.</para><para>This method overrides <see cref="M:System.Security.CodeAccessPermission.FromXml(System.Security.SecurityElement)" />.</para></block></remarks><exception cref="T:System.ArgumentNullException"><paramref name="esd" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException"><para><paramref name="esd" /> does not contain the encoding for a <see cref="T:System.Security.Permissions.EnvironmentPermission" /> instance.</para><para>The version number of <paramref name="esd" /> is not valid.</para></exception><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reconstructs a permission with a specified state from an XML encoding.</para></summary><param name="esd"><attribution license="cc4" from="Microsoft" modified="false" />The XML encoding to use to reconstruct the permission. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetPathList"><MemberSignature Language="C#" Value="public string GetPathList (System.Security.Permissions.EnvironmentPermissionAccess flag);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetPathList(valuetype System.Security.Permissions.EnvironmentPermissionAccess flag) 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.String</ReturnType></ReturnValue><Parameters><Parameter Name="flag" Type="System.Security.Permissions.EnvironmentPermissionAccess" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Use this method to get the state of the current permission. To get both Read and Write access states requires two calls to this method.</para><block subset="none" type="note"><para>The <paramref name="flag" /> parameter is limited to the values of <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" />, which represent single types of environment variable access. Those values are <see cref="F:System.Security.Permissions.EnvironmentPermissionAccess.Read" /> and <see cref="F:System.Security.Permissions.EnvironmentPermissionAccess.Write" />. The values acceptable to <paramref name="flag" /> do not include <see cref="F:System.Security.Permissions.EnvironmentPermissionAccess.NoAccess" /> and <see cref="F:System.Security.Permissions.EnvironmentPermissionAccess.AllAccess" />, which do not represent single types of environment variable access.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets all environment variables with the specified <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A list of environment variables (semicolon-separated) for the selected flag.</para></returns><param name="flag"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" /> values that represents a single type of environment variable access. </param></Docs></Member><Member MemberName="Intersect"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Intersect(class System.Security.IPermission target)" /><MemberSignature Language="C#" Value="public override System.Security.IPermission Intersect (System.Security.IPermission target);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Intersect(class System.Security.IPermission target) 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><Parameter Name="target" Type="System.Security.IPermission" /></Parameters><Docs><exception cref="T:System.ArgumentException"><paramref name="target" /> is not <see langword="null" /> and is not of type <see cref="T:System.Security.Permissions.EnvironmentPermission" />. </exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The intersection of two permissions is a permission that describes the state they both describe in common. Only a demand that passes both original permissions will pass the intersection.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates and returns a permission that is the intersection of the current permission and the specified permission.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A new permission that represents the intersection of the current permission and the specified permission. This new permission is null if the intersection is empty.</para></returns><param name="target"><attribution license="cc4" from="Microsoft" modified="false" />A permission to intersect with the current permission. It must be of the same type as the current permission. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="IsSubsetOf"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool IsSubsetOf(class System.Security.IPermission target)" /><MemberSignature Language="C#" Value="public override bool IsSubsetOf (System.Security.IPermission target);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsSubsetOf(class System.Security.IPermission target) 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.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="target" Type="System.Security.IPermission" /></Parameters><Docs><exception cref="T:System.ArgumentException"><paramref name="target" /> is not <see langword="null" /> and is not of type <see cref="T:System.Security.Permissions.EnvironmentPermission" /> .</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The current permission is a subset of the specified permission if the current permission specifies a state that is wholly contained by the specified permission. For example, a permission that represents access to C:\example.txt is a subset of a permission that represents access to C:\. If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Determines whether the current permission is a subset of the specified permission.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if the current permission is a subset of the specified permission; otherwise, false.</para></returns><param name="target"><attribution license="cc4" from="Microsoft" modified="false" />A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="IsUnrestricted"><MemberSignature Language="C#" Value="public bool IsUnrestricted ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool IsUnrestricted() 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.Boolean</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>An unrestricted permission represents the union of all possible states of the permission.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a value indicating whether the current permission is unrestricted.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if the current permission is unrestricted; otherwise, false.</para></returns></Docs></Member><Member MemberName="SetPathList"><MemberSignature Language="C#" Value="public void SetPathList (System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetPathList(valuetype System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) 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.Void</ReturnType></ReturnValue><Parameters><Parameter Name="flag" Type="System.Security.Permissions.EnvironmentPermissionAccess" /><Parameter Name="pathList" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The previous state of the current permission is overwritten.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sets the specified access to the specified environment variables to the existing state of the permission.</para></summary><param name="flag"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.EnvironmentPermissionAccess" /> values. </param><param name="pathList"><attribution license="cc4" from="Microsoft" modified="false" />A list of environment variables (semicolon-separated). </param></Docs></Member><Member MemberName="System.Security.Permissions.IBuiltInPermission.GetTokenIndex"><MemberSignature Language="C#" Value="int IBuiltInPermission.GetTokenIndex ();" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Security.Permissions.IBuiltInPermission.GetTokenIndex() 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.Int32</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="ToXml"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.SecurityElement ToXml()" /><MemberSignature Language="C#" Value="public override System.Security.SecurityElement ToXml ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.SecurityElement ToXml() 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.SecurityElement</ReturnType></ReturnValue><Parameters /><Docs><remarks><block subset="none" type="note"><para>For the XML encoding for this class, see the <see cref="T:System.Security.Permissions.EnvironmentPermission" /> class
 page.</para><para>This method overrides <see cref="M:System.Security.CodeAccessPermission.ToXml" /> .</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates an XML encoding of the permission and its current state.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An XML encoding of the permission, including any state information.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="Union"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Union(class System.Security.IPermission other)" /><MemberSignature Language="C#" Value="public override System.Security.IPermission Union (System.Security.IPermission other);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Union(class System.Security.IPermission other) 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><Parameter Name="other" Type="System.Security.IPermission" /></Parameters><Docs><exception cref="T:System.ArgumentException"><paramref name="other " /> is not <see langword="null" /> and is not of type <see cref="T:System.Security.Permissions.EnvironmentPermission" /> .</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The result of a call to <see cref="M:System.Security.Permissions.EnvironmentPermission.Union(System.Security.IPermission)" /> is a permission that represents all the states represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates a permission that is the union of the current permission and the specified permission.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A new permission that represents the union of the current permission and the specified permission.</para></returns><param name="other"><attribution license="cc4" from="Microsoft" modified="false" />A permission to combine with the current permission. It must be of the same type as the current permission. </param></Docs><Excluded>0</Excluded></Member></Members><TypeExcluded>0</TypeExcluded></Type>