Share via


RemotingConfiguration.IsActivationAllowed(Type) Yöntem

Tanım

Belirtilen Type istemcinin etkinleştirilmesine izin verilip verilmeyeceğini belirten bir Boole değeri döndürür.

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

Parametreler

svrType
Type

Denetlenecek nesne Type .

Döndürülenler

true belirtilen Type istemcinin etkinleştirilmesine izin verilirse; aksi takdirde , false.

Özel durumlar

Çağrı yığınında daha yüksek arayanlardan en az birinin uzaktan iletişim türlerini ve kanallarını yapılandırma izni yoktur.

Örnekler

// 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

Açıklamalar

Geçerli yöntem sunucu sonunda nesnenin etkinleştirilmesine Type sunucu tarafından açıkça izin verilip verilmediğini belirlemek için kullanılır.

Şunlara uygulanır