StreamUpgradeAcceptor.CanUpgrade(String) 方法

定義

判斷這個升級接受器是否支援要求的升級。Determines whether the upgrade requested is supported by this upgrade acceptor.

public:
 abstract bool CanUpgrade(System::String ^ contentType);
public abstract bool CanUpgrade (string contentType);
abstract member CanUpgrade : string -> bool
Public MustOverride Function CanUpgrade (contentType As String) As Boolean

參數

contentType
String

要檢查的內容型別。The type of content to be checked.

傳回

如果支援這種升級,則為 true,否則為 falsetrue if this kind of upgrade is supported; otherwise, false.

備註

開發者可以檢查要求的內容型別,並判斷所產生的升級是否可以由這個升級接受器執行。The developer can inspect the requested content type and determine whether the resulting upgrade can be performed by this upgrade acceptor. 這個內容型別來自對應升級啟動器上的 GetNextUpgrade 方法。This content type comes from the GetNextUpgrade method on the matching upgrade initiator.

適用於