Upraviť

Zdieľať cez


CodeConnectAccess.OriginPort Field

Definition

Contains the value used to represent the port value in the URI where code originated.

public: static initonly int OriginPort;
public static readonly int OriginPort;
 staticval mutable OriginPort : int
Public Shared ReadOnly OriginPort As Integer 

Field Value

Examples

The following code example demonstrates creating a CodeConnectAccess object that specifies the HTTP scheme and origin port.



static CodeConnectAccess^ CreateHttpAndOriginPortAccess()
{
    return gcnew CodeConnectAccess(Uri::UriSchemeHttp, 
        CodeConnectAccess::OriginPort);
}

    public static CodeConnectAccess CreateHttpAndOriginPortAccess()
{
    return new CodeConnectAccess(Uri.UriSchemeHttp, CodeConnectAccess.OriginPort);
}

Remarks

To create a CodeConnectAccess object that has the same port as the port in the executing code's URL evidence, use this field as the allowPort parameter of the CodeConnectAccess constructor.

The value of this field is -4.

Applies to