LicenseException クラスとは? わかりやすく解説

LicenseException クラス

コンポーネントライセンス与えられなかった場合スローされる例外表します

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

<SerializableAttribute> _
Public Class LicenseException
    Inherits SystemException
Dim instance As LicenseException
[SerializableAttribute] 
public class LicenseException : SystemException
[SerializableAttribute] 
public ref class LicenseException : public
 SystemException
/** @attribute SerializableAttribute() */ 
public class LicenseException extends SystemException
SerializableAttribute 
public class LicenseException extends
 SystemException
解説解説
使用例使用例

LicenseExceptionキャッチしその内容解釈するコード例次に示します。このサンプルでは、アプリケーションは、ライセンス付きでない System.Windows.Forms.Form に対して Validate メソッド呼び出します。例外キャッチしたときに、このサンプルそれぞれのエラー メッセージライセンス付きでないコンポーネント種類スタック トレース、および例外発生源フェッチます。

この例では、System.Windows.Forms.Form を LicenseProviderAttribute 属性マークして、LicenseProvider を指定していることが必要です。この方法の詳細については、LicenseManager クラストピック参照してください

Try
    Dim licTest As License
    licTest = LicenseManager.Validate(GetType(Form1), Me)
Catch licE As LicenseException
    Console.WriteLine(licE.Message)
    Console.WriteLine(licE.LicensedType)
    Console.WriteLine(licE.StackTrace)
    Console.WriteLine(licE.Source)
End Try
try {
    License licTest = null;
    licTest = LicenseManager.Validate(typeof(Form1), this);
}

catch(LicenseException licE) {
    Console.WriteLine(licE.Message);
    Console.WriteLine(licE.LicensedType);
    Console.WriteLine(licE.StackTrace);
    Console.WriteLine(licE.Source);    
}
try
{
   License^ licTest = nullptr;
   licTest = LicenseManager::Validate( Form1::typeid, this );
}
catch ( LicenseException^ licE ) 
{
   Console::WriteLine( licE->Message );
   Console::WriteLine( licE->LicensedType );
   Console::WriteLine( licE->StackTrace );
   Console::WriteLine( licE->Source );
}
try {
    License licTest = null;
    licTest = LicenseManager.Validate(Form1.class.ToType(), this);
}
catch (LicenseException licE) {
    Console.WriteLine(licE.get_Message());
    Console.WriteLine(licE.get_LicensedType());
    Console.WriteLine(licE.get_StackTrace());
    Console.WriteLine(licE.get_Source());
}
継承階層継承階層
System.Object
   System.Exception
     System.SystemException
      System.ComponentModel.LicenseException
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LicenseException メンバ
System.ComponentModel 名前空間
License クラス
LicenseContext クラス
LicenseManager
LicenseProvider
LicenseProviderAttribute
LicFileLicenseProvider
LicenseUsageMode



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「LicenseException クラス」の関連用語

LicenseException クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



LicenseException クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS