RemotingConfiguration.IsActivationAllowed(Type) 메서드

정의

지정된 Type을 클라이언트에서 활성화할 수 있는지 여부를 나타내는 부울 값을 반환합니다.

public:
 static bool IsActivationAllowed(Type ^ svrType);
public static bool IsActivationAllowed (Type svrType);
static member IsActivationAllowed : Type -> bool
Public Shared Function IsActivationAllowed (svrType As Type) As Boolean

매개 변수

svrType
Type

확인할 개체 Type입니다.

반환

지정된 Type을 클라이언트에서 활성화할 수 있으면 true이고, 그렇지 않으면 false입니다.

예외

호출 스택의 상위 호출자 중 하나 이상에게 원격 형식 및 채널을 구성하기 위한 권한이 없는 경우

예제

// Check whether the 'MyServerImpl' object is allowed for 
// activation or not.
if ( RemotingConfiguration::IsActivationAllowed( MyServerImpl::typeid ) )
{
   // Get the registered activated service types .
   array<ActivatedServiceTypeEntry^>^myActivatedServiceEntries = RemotingConfiguration::GetRegisteredActivatedServiceTypes();
   Console::WriteLine( "The Length of the registered activated service type array is {0}", myActivatedServiceEntries->Length );
   Console::WriteLine( "The Object type is:{0}", myActivatedServiceEntries[ 0 ]->ObjectType );
}

// Check whether the 'MyServerImpl' object is allowed for
// activation or not.
if(RemotingConfiguration.IsActivationAllowed(typeof(MyServerImpl)))
{
 // Get the registered activated service types .
 ActivatedServiceTypeEntry[] myActivatedServiceEntries =
       RemotingConfiguration.GetRegisteredActivatedServiceTypes();
Console.WriteLine("The Length of the registered activated service"
                 +" type array is "+myActivatedServiceEntries.Length);
Console.WriteLine("The Object type is:"
                    +myActivatedServiceEntries[0].ObjectType);
}
' Check whether the 'MyServerImpl' object is allowed for activation or not.
If RemotingConfiguration.IsActivationAllowed(GetType(MyServerImpl)) Then
   ' Get the registered activated service types .
   Dim myActivatedServiceEntries As ActivatedServiceTypeEntry() = _ 
                       RemotingConfiguration.GetRegisteredActivatedServiceTypes()
   Console.WriteLine("The Length of the registered activated service type array is " + _ 
                                  myActivatedServiceEntries.Length.ToString())
   Console.WriteLine("The Object type is:" + _ 
                           myActivatedServiceEntries(0).ObjectType.ToString())
End If

설명

현재 메서드는 서버 끝에서 개체 Type 의 활성화가 서버에서 명시적으로 허용되는지 여부를 결정하는 데 사용됩니다.

적용 대상