﻿<?xml version="1.0" encoding="utf-8"?><Type Name="SocketPermissionAttribute" FullName="System.Net.SocketPermissionAttribute" FullNameSP="System_Net_SocketPermissionAttribute" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public sealed serializable SocketPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" /><TypeSignature Language="C#" Value="public sealed class SocketPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit SocketPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" /><MemberOfLibrary>Networking</MemberOfLibrary><AssemblyInfo><AssemblyName>System</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey><AssemblyVersion>1.0.x.x</AssemblyVersion><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></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To use this attribute, your <see cref="T:System.Net.Sockets.Socket" /> connection must conform to the properties that are specified in your <see cref="T:System.Net.SocketPermissionAttribute" />. For example, to apply the permission to a <see cref="T:System.Net.Sockets.Socket" /> connection on port 80, set the <see cref="P:System.Net.SocketPermissionAttribute.Port" /> property of the <see cref="T:System.Net.SocketPermissionAttribute" /> to "80". The security information that is specified in <see cref="T:System.Net.SocketPermissionAttribute" /> is stored in the metadata of the attribute target, which is the class to which the <see cref="T:System.Net.SocketPermissionAttribute" /> is applied. The system then accesses the information at run time. The <see cref="T:System.Security.Permissions.SecurityAction" /> that is passed to the constructor determines the allowable <see cref="T:System.Net.SocketPermissionAttribute" /> targets.</para><block subset="none" type="note"><para>The properties of a <see cref="T:System.Net.SocketPermissionAttribute" /> must have values that are not null. Also, once set, the values of the properties cannot be changed.</para></block><block subset="none" type="note"><para>For more information about using attributes, see <format type="text/html"><a href="30386922-1E00-4602-9EBF-526B271A8B87">[&lt;topic://cpconExtendingMetadataUsingAttributes&gt;]</a></format>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Specifies security actions to control <see cref="T:System.Net.Sockets.Socket" /> connections. 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.SecurityAction action)" /><MemberSignature Language="C#" Value="public SocketPermissionAttribute (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><permission cref="T:System.ArgumentException"><paramref name="action " /> is not a valid <see cref="T:System.Security.Permissions.SecurityAction" /> value.</permission><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="T:System.Security.Permissions.SecurityAction" /> value that is passed to this constructor specifies the allowable <see cref="T:System.Net.SocketPermissionAttribute" /> targets.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.SocketPermissionAttribute" /> class with the specified <see cref="T:System.Security.Permissions.SecurityAction" /> value.</para></summary><param name="action"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="Access"><MemberSignature Language="ILASM" Value=".property string Access { public hidebysig specialname instance string get_Access() public hidebysig specialname instance void set_Access(string value) }" /><MemberSignature Language="C#" Value="public string Access { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string Access" /><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><value><para>A <see cref="T:System.String" /> containing a
   network access method allowed by the current instance. Valid values are
   "Accept" and "Connect".</para></value><exception cref="T:System.ArgumentException"><see cref="P:System.Net.SocketPermissionAttribute.Access" /> is being set and is not <see langword="null" /> .</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property is write-once. Valid values for this property correspond to <see cref="T:System.Net.NetworkAccess" /> enumeration values.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the network access method that is allowed by this <see cref="T:System.Net.SocketPermissionAttribute" />.</para></summary></Docs><Excluded>0</Excluded></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><exception cref="T:System.ArgumentException">One or more of the current instance's <see cref="P:System.Net.SocketPermissionAttribute.Access" />, <see cref="P:System.Net.SocketPermissionAttribute.Host" />, <see cref="P:System.Net.SocketPermissionAttribute.Transport" /> or <see cref="P:System.Net.SocketPermissionAttribute.Port" /> properties is <see langword="null" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.SocketPermissionAttribute.CreatePermission" /> method is called by the security system, not by the application code. The security information described by <see cref="T:System.Net.SocketPermissionAttribute" /> is stored in the metadata of the attribute target, which is the class to which the <see cref="T:System.Net.SocketPermissionAttribute" /> is applied. The system then accesses the information at run-time and calls <see cref="M:System.Net.SocketPermissionAttribute.CreatePermission" />. The system uses the returned <see cref="T:System.Security.IPermission" /> to enforce the specified security requirements.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Creates and returns a new instance of the <see cref="T:System.Net.SocketPermission" /> class.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An instance of the <see cref="T:System.Net.SocketPermission" /> class that corresponds to the security declaration.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="Host"><MemberSignature Language="ILASM" Value=".property string Host { public hidebysig specialname instance string get_Host() public hidebysig specialname instance void set_Host(string value) }" /><MemberSignature Language="C#" Value="public string Host { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string Host" /><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><value><para>A <see cref="T:System.String" /> containing a DNS host name or
   IP address.</para></value><exception cref="T:System.ArgumentException"><see cref="P:System.Net.SocketPermissionAttribute.Host" /> is being set and is not <see langword="null" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property is write-once and specifies the Domain Name Services (DNS) host name to which this permission applies.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the DNS host name or IP address that is specified by this <see cref="T:System.Net.SocketPermissionAttribute" />.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName="Port"><MemberSignature Language="ILASM" Value=".property string Port { public hidebysig specialname instance string get_Port() public hidebysig specialname instance void set_Port(string value) }" /><MemberSignature Language="C#" Value="public string Port { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string Port" /><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><value><para>A <see cref="T:System.String" /> containing a port number, or "All" or
   -1 to indicate all
   ports.</para></value><exception cref="T:System.ArgumentException"><see cref="P:System.Net.SocketPermissionAttribute.Port" /> is being set and is not <see langword="null" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property is write-once and specifies the port number to which this permission applies. The valid values are a string-encoded integer or the string "All".</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the port number that is associated with this <see cref="T:System.Net.SocketPermissionAttribute" />.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName="Transport"><MemberSignature Language="ILASM" Value=".property string Transport { public hidebysig specialname instance string get_Transport() public hidebysig specialname instance void set_Transport(string value) }" /><MemberSignature Language="C#" Value="public string Transport { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string Transport" /><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><value><para>A <see cref="T:System.String" /> containing the
   transport type associated with the current
   instance. Valid values are "All", "Connectionless", "ConnectionOriented", "Tcp", and
   "Udp".</para></value><exception cref="T:System.ArgumentException"><see cref="P:System.Net.SocketPermissionAttribute.Transport" /> is being set and is not <see langword="null" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Possible string values of this property are <see cref="F:System.Net.TransportType.All" />, <see cref="F:System.Net.TransportType.Connectionless" />, <see cref="F:System.Net.TransportType.ConnectionOriented" />, <see cref="F:System.Net.TransportType.Tcp" />, and <see cref="F:System.Net.TransportType.Udp" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the <see cref="T:System.Net.TransportType" /> that is specified by this <see cref="T:System.Net.SocketPermissionAttribute" />.</para></summary></Docs><Excluded>0</Excluded></Member></Members><TypeExcluded>0</TypeExcluded></Type>