RemotingConfiguration.GetRegisteredWellKnownClientTypes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取登錄在用戶端做為已知型別的物件型別陣列。
public:
static cli::array <System::Runtime::Remoting::WellKnownClientTypeEntry ^> ^ GetRegisteredWellKnownClientTypes();
public static System.Runtime.Remoting.WellKnownClientTypeEntry[] GetRegisteredWellKnownClientTypes ();
static member GetRegisteredWellKnownClientTypes : unit -> System.Runtime.Remoting.WellKnownClientTypeEntry[]
Public Shared Function GetRegisteredWellKnownClientTypes () As WellKnownClientTypeEntry()
傳回
登錄在用戶端做為已知型別的物件型別陣列。
例外狀況
至少有一個呼叫堆疊中較高的呼叫端,不具有設定遠端類型和通道的使用權限。
範例
// Get the well-known types registered at the client.
array<WellKnownClientTypeEntry^>^myEntries = RemotingConfiguration::GetRegisteredWellKnownClientTypes();
Console::WriteLine( "The number of WellKnownClientTypeEntries are:{0}", myEntries->Length );
Console::WriteLine( "The Object type is:{0}", myEntries[ 0 ]->ObjectType );
Console::WriteLine( "The Object Url is:{0}", myEntries[ 0 ]->ObjectUrl );
// Get the well-known types registered at the client.
WellKnownClientTypeEntry[] myEntries =
RemotingConfiguration.GetRegisteredWellKnownClientTypes();
Console.WriteLine("The number of WellKnownClientTypeEntries are:"
+myEntries.Length);
Console.WriteLine("The Object type is:"+myEntries[0].ObjectType);
Console.WriteLine("The Object Url is:"+myEntries[0].ObjectUrl);
' Get the well-known types registered at the client.
Dim myEntries As WellKnownClientTypeEntry() = _
RemotingConfiguration.GetRegisteredWellKnownClientTypes()
Console.WriteLine("The number of WellKnownClientTypeEntries are:" + _
myEntries.Length.ToString())
Console.WriteLine("The Object type is:" + myEntries(0).ObjectType.ToString())
Console.WriteLine("The Object Url is:" + myEntries(0).ObjectUrl.ToString())
備註
已知的物件類型可以是單一呼叫或單一呼叫。 如果物件類型是單一呼叫,則每次從用戶端呼叫時都會建立它的新實例。 單一物件的所有呼叫都會由該物件的一個實例處理。
如需已知物件的更詳細描述,請參閱 伺服器啟用。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應