CodeGenerator.Options プロパティ
アセンブリ: System (system.dll 内)

コード ジェネレータで使用されるオプションを示す CodeGeneratorOptions オブジェクト。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeGeneratorOptions クラス
アセンブリ: System (system.dll 内)


CodeGeneratorOptions は、コード生成中に使用するオプションを指定するために、ICodeGenerator 実装のコード生成メソッドに渡されます。
IndentString プロパティは、各インデント幅に使用する文字列を指定します。BracingStyle プロパティは、コード ブロックの境界を示す中かっこの配置スタイルを指定します。ElseOnClosing プロパティは、if ブロックや try ブロックの終了行に、else、catch、finally の各ブロックを中かっこも含めて追加するかどうかを指定します。BlankLinesBetweenMembers プロパティは、各メンバの間に空行を挿入するかどうかを指定します。
ICodeGenerator 実装は、Item ディクショナリ インデクサを使用して、データを設定したり渡すことができるカスタム コード生成オプションを提供できます。コード ジェネレータは、このディクショナリを検索して、追加のコード生成オプションを見つけることができます。
![]() |
---|
このクラスは、すべてのメンバに適用されるリンク確認要求および継承確認要求をクラス レベルで格納します。直前の呼び出し元または派生クラスに完全信頼のアクセス許可がない場合、SecurityException がスローされます。セキュリティ要求の詳細については、「リンク確認要求」および「継承確認要求」を参照してください。 |

' Creates a new CodeGeneratorOptions. Dim genOptions As New CodeGeneratorOptions() ' Sets a value indicating that the code generator should insert blank lines between type members. genOptions.BlankLinesBetweenMembers = True ' Sets the style of bracing format to use: either "Block" to start a ' bracing block on the same line as the declaration of its container, or ' "C" to start the bracing for the block on the following line. genOptions.BracingStyle = "C" ' Sets a value indicating that the code generator should not append an else, ' catch or finally block, including brackets, at the closing line of a preceeding if or try block. genOptions.ElseOnClosing = False ' Sets the string to indent each line with. genOptions.IndentString = " " ' Uses the CodeGeneratorOptions indexer property to set an ' example object to the type's string-keyed ListDictionary. ' Custom ICodeGenerator implementations can use objects ' in this dictionary to customize process behavior. genOptions("CustomGeneratorOptionStringExampleID") = "BuildFlags: /A /B /C /D /E"
// Creates a new CodeGeneratorOptions. CodeGeneratorOptions genOptions = new CodeGeneratorOptions(); // Sets a value indicating that the code generator should insert blank lines between type members. genOptions.BlankLinesBetweenMembers = true; // Sets the style of bracing format to use: either "Block" to start a // bracing block on the same line as the declaration of its container, or // "C" to start the bracing for the block on the following line. genOptions.BracingStyle = "C"; // Sets a value indicating that the code generator should not append an else, // catch or finally block, including brackets, at the closing line of a preceeding if or try block. genOptions.ElseOnClosing = false; // Sets the string to indent each line with. genOptions.IndentString = " "; // Uses the CodeGeneratorOptions indexer property to set an // example object to the type's string-keyed ListDictionary. // Custom ICodeGenerator implementations can use objects // in this dictionary to customize process behavior. genOptions["CustomGeneratorOptionStringExampleID"] = "BuildFlags: /A /B /C /D /E";
// Creates a new CodeGeneratorOptions. CodeGeneratorOptions^ genOptions = gcnew CodeGeneratorOptions; // Sets a value indicating that the code generator should insert blank lines between type members. genOptions->BlankLinesBetweenMembers = true; // Sets the style of bracing format to use: either S"Block" to start a // bracing block on the same line as the declaration of its container, or // S"C" to start the bracing for the block on the following line. genOptions->BracingStyle = "C"; // Sets a value indicating that the code generator should not append an else, // catch or finally block, including brackets, at the closing line of a preceeding if or try block. genOptions->ElseOnClosing = false; // Sets the String* to indent each line with. genOptions->IndentString = " "; // Uses the CodeGeneratorOptions indexer property to set an // example Object* to the type's String*-keyed ListDictionary. // Custom ICodeGenerator* implementations can use objects // in this dictionary to customize process behavior. genOptions[ "CustomGeneratorOptionStringExampleID" ] = "BuildFlags: /A /B /C /D /E";


System.CodeDom.Compiler.CodeGeneratorOptions


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeGeneratorOptions コンストラクタ
アセンブリ: System (system.dll 内)


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeGeneratorOptions プロパティ

名前 | 説明 | |
---|---|---|
![]() | BlankLinesBetweenMembers | 各メンバの間に空行を挿入するかどうかを示す値を取得または設定します。 |
![]() | BracingStyle | 中かっこの記述時に適用するスタイルを取得または設定します。 |
![]() | ElseOnClosing | else、catch、finally の各ブロックを中かっこも含め、先行する if ブロックまたは try ブロックの終了行に追加するかどうかを示す値を取得または設定します。 |
![]() | IndentString | インデントに使用する文字列を取得または設定します。 |
![]() | Item | 指定したインデックスにあるオブジェクトを取得または設定します。 |
![]() | VerbatimOrder | メンバがメンバ コレクションに現れる順番でメンバを生成するかどうかを示す値を取得または設定します。 |

CodeGeneratorOptions メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

CodeGeneratorOptions メンバ
コード ジェネレータで使用するオプションのセットを表します。
CodeGeneratorOptions データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | BlankLinesBetweenMembers | 各メンバの間に空行を挿入するかどうかを示す値を取得または設定します。 |
![]() | BracingStyle | 中かっこの記述時に適用するスタイルを取得または設定します。 |
![]() | ElseOnClosing | else、catch、finally の各ブロックを中かっこも含め、先行する if ブロックまたは try ブロックの終了行に追加するかどうかを示す値を取得または設定します。 |
![]() | IndentString | インデントに使用する文字列を取得または設定します。 |
![]() | Item | 指定したインデックスにあるオブジェクトを取得または設定します。 |
![]() | VerbatimOrder | メンバがメンバ コレクションに現れる順番でメンバを生成するかどうかを示す値を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からCodeGeneratorOptionsを検索する場合は、下記のリンクをクリックしてください。

- CodeGeneratorOptionsのページへのリンク