C#で保護された方法にアクセスする方法
-
28-10-2019 - |
質問
保護された方法にアクセスする方法を知りたいです。
多くの保護された方法があるウェブブラウザーコントロール(Awesomium)があります。
このWebControlでWinformでタブ付きブラウザを作成しました。
今、私はIEを使用できません InjectKeyboard
- メソッドは保護されています。
これが方法です:
// Injects a keyboard event.
//
// Parameter:
// keyEvent:
// The keyboard event to inject. You'll need to initialize the members of the
// passed Awesomium.Core.WebKeyboardEvent, yourself.
//
// Note:
// Awesomium.Windows.Forms.WebControl handles this internally. Inheritors do
// not need to call this method unless they implement custom logic. This method
// bypasses settings of the Awesomium.Windows.Forms.WebControl.InputController.
// For performance reasons, no validity check is performed when calling protected
// members. Inheritors should perform any such checks (see Awesomium.Windows.Forms.WebControl.IsLive),
// before calling these members.
protected void InjectKeyboardEvent(WebKeyboardEvent keyEvent);
APIリンクはあります ここ
なぜ彼らはこの方法を保護し、どうすればそれを使用できますか?
解決
このクラスから継承し、必要な場合はメソッドを公開します(メソッド上のコメントで提案されています)。
所属していません StackOverflow