CodeConnectAccess.CreateAnySchemeAccess(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a CodeConnectAccess instance that represents access to the specified port using any scheme.
public:
static System::Security::Policy::CodeConnectAccess ^ CreateAnySchemeAccess(int allowPort);
public static System.Security.Policy.CodeConnectAccess CreateAnySchemeAccess (int allowPort);
static member CreateAnySchemeAccess : int -> System.Security.Policy.CodeConnectAccess
Public Shared Function CreateAnySchemeAccess (allowPort As Integer) As CodeConnectAccess
Parameters
- allowPort
- Int32
The port represented by the returned instance.
Returns
A CodeConnectAccess instance for the specified port.
Exceptions
Examples
The following code example demonstrates calling this method. For an example that demonstrates using CodeConnectAccess objects to create a code group and adding the code group to a policy level, see the CodeConnectAccess class overview.
static CodeConnectAccess^ CreateAnySchemeOriginPortAccess()
{
return CodeConnectAccess::CreateAnySchemeAccess
(CodeConnectAccess::OriginPort);
}
public static CodeConnectAccess CreateAnySchemeOriginPortAccess()
{
return CodeConnectAccess.CreateAnySchemeAccess(CodeConnectAccess.OriginPort);
}
Remarks
The CodeConnectAccess instance returned by this method uses the scheme wildcard value AnyScheme ("*") to represent the scheme.