CodeEntryPointMethod イベント

名前 | 説明 | |
---|---|---|
![]() | PopulateImplementationTypes | ImplementationTypes コレクションが最初にアクセスされたときに発生するイベント。 ( CodeMemberMethod から継承されます。) |
![]() | PopulateParameters | Parameters コレクションが最初にアクセスされたときに発生するイベント。 ( CodeMemberMethod から継承されます。) |
![]() | PopulateStatements | Statements コレクションが最初にアクセスされたときに発生するイベント。 ( CodeMemberMethod から継承されます。) |

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

<SerializableAttribute> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class CodeEntryPointMethod Inherits CodeMemberMethod
[SerializableAttribute] [ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class CodeEntryPointMethod : CodeMemberMethod
[SerializableAttribute] [ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class CodeEntryPointMethod : public CodeMemberMethod


CodeEntryPointMethod を使用して、プログラムの実行を開始するメソッドを示す例を次に示します。
' Builds a Hello World Program Graph using System.CodeDom objects Public Shared Function BuildHelloWorldGraph() As CodeCompileUnit ' Create a new CodeCompileUnit to contain the program graph Dim CompileUnit As New CodeCompileUnit() ' Declare a new namespace object and name it Dim Samples As New CodeNamespace("Samples") ' Add the namespace object to the compile unit CompileUnit.Namespaces.Add(Samples) ' Add a new namespace import for the System namespace Samples.Imports.Add(New CodeNamespaceImport("System")) ' Declare a new type object and name it Dim Class1 As New CodeTypeDeclaration("Class1") ' Add the new type to the namespace object's type collection Samples.Types.Add(Class1) ' Declare a new code entry point method Dim Start As New CodeEntryPointMethod() ' Create a new method invoke expression Dim cs1 As New CodeMethodInvokeExpression(New CodeTypeReferenceExpression("System.Console"), "WriteLine", New CodePrimitiveExpression("Hello World!")) ' Call the System.Console.WriteLine method ' Pass a primitive string parameter to the WriteLine method ' Add the new method code statement Start.Statements.Add(New CodeExpressionStatement(cs1)) ' Add the code entry point method to the type's members collection Class1.Members.Add(Start) Return CompileUnit End Function 'BuildHelloWorldGraph
// Builds a Hello World Program Graph using System.CodeDom objects public static CodeCompileUnit BuildHelloWorldGraph() { // Create a new CodeCompileUnit to contain the program graph CodeCompileUnit CompileUnit = new CodeCompileUnit(); // Declare a new namespace object and name it CodeNamespace Samples = new CodeNamespace("Samples"); // Add the namespace object to the compile unit CompileUnit.Namespaces.Add( Samples ); // Add a new namespace import for the System namespace Samples.Imports.Add( new CodeNamespaceImport("System") ); // Declare a new type object and name it CodeTypeDeclaration Class1 = new CodeTypeDeclaration("Class1"); // Add the new type to the namespace object's type collection Samples.Types.Add(Class1); // Declare a new code entry point method CodeEntryPointMethod Start = new CodeEntryPointMethod(); // Create a new method invoke expression CodeMethodInvokeExpression cs1 = new CodeMethodInvokeExpression( // Call the System.Console.WriteLine method new CodeTypeReferenceExpression("System.Console"), "WriteLine", // Pass a primitive string parameter to the WriteLine method new CodePrimitiveExpression("Hello World!") ); // Add the new method code statement Start.Statements.Add(new CodeExpressionStatement(cs1)); // Add the code entry point method to the type's members collection Class1.Members.Add( Start ); return CompileUnit;
// Builds a Hello World Program Graph using System.CodeDom objects static CodeCompileUnit^ BuildHelloWorldGraph() { // Create a new CodeCompileUnit to contain the program graph CodeCompileUnit^ CompileUnit = gcnew CodeCompileUnit; // Declare a new namespace object and name it CodeNamespace^ Samples = gcnew CodeNamespace( "Samples" ); // Add the namespace object to the compile unit CompileUnit->Namespaces->Add( Samples ); // Add a new namespace import for the System namespace Samples->Imports->Add( gcnew CodeNamespaceImport( "System" ) ); // Declare a new type object and name it CodeTypeDeclaration^ Class1 = gcnew CodeTypeDeclaration( "Class1" ); // Add the new type to the namespace object's type collection Samples->Types->Add( Class1 ); // Declare a new code entry point method CodeEntryPointMethod^ Start = gcnew CodeEntryPointMethod; // Create a new method invoke expression array<CodeExpression^>^temp = {gcnew CodePrimitiveExpression( "Hello World!" )}; CodeMethodInvokeExpression^ cs1 = gcnew CodeMethodInvokeExpression( gcnew CodeTypeReferenceExpression( "System.Console" ),"WriteLine",temp ); // Add the new method code statement Start->Statements->Add( gcnew CodeExpressionStatement( cs1 ) ); // Add the code entry point method to the type's members collection Class1->Members->Add( Start ); return CompileUnit;
// Builds a Hello World Program Graph using System.CodeDom objects public static CodeCompileUnit BuildHelloWorldGraph() { // Create a new CodeCompileUnit to contain the program graph CodeCompileUnit compileUnit = new CodeCompileUnit(); // Declare a new namespace object and name it CodeNamespace samples = new CodeNamespace("Samples"); // Add the namespace object to the compile unit compileUnit.get_Namespaces().Add(samples); // Add a new namespace import for the System namespace samples.get_Imports().Add(new CodeNamespaceImport("System")); // Declare a new type object and name it CodeTypeDeclaration class1 = new CodeTypeDeclaration("Class1"); // Add the new type to the namespace object's type collection samples.get_Types().Add(class1); // Declare a new code entry point method CodeEntryPointMethod start = new CodeEntryPointMethod(); // Create a new method invoke expression CodeMethodInvokeExpression cs1 = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression("System.Console"), "WriteLine", new CodeExpression[] { new CodePrimitiveExpression("Hello World!") }); // Call the System.Console.WriteLine method // Pass a primitive string parameter to the WriteLine method // Add the new method code statement start.get_Statements().Add(new CodeExpressionStatement(cs1)); // Add the code entry point method to the type's members collection class1.get_Members().Add(start); return compileUnit;

System.CodeDom.CodeObject
System.CodeDom.CodeTypeMember
System.CodeDom.CodeMemberMethod
System.CodeDom.CodeEntryPointMethod


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeEntryPointMethod コンストラクタ
アセンブリ: 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeEntryPointMethod プロパティ

名前 | 説明 | |
---|---|---|
![]() | Attributes | メンバの属性を取得または設定します。 ( CodeTypeMember から継承されます。) |
![]() | Comments | 型メンバのコメント コレクションを取得します。 ( CodeTypeMember から継承されます。) |
![]() | CustomAttributes | メンバのカスタム属性を取得または設定します。 ( CodeTypeMember から継承されます。) |
![]() | EndDirectives | メンバの終了ディレクティブを取得します。 ( CodeTypeMember から継承されます。) |
![]() | ImplementationTypes | メソッドの実装が PrivateImplementationType プロパティで示されるプライベート メソッド実装である場合を除き、このメソッドによって実装されるインターフェイスのデータ型を取得します。 ( CodeMemberMethod から継承されます。) |
![]() | LinePragma | 型メンバのステートメントが発生する行を取得または設定します。 ( CodeTypeMember から継承されます。) |
![]() | Name | メンバの名前を取得または設定します。 ( CodeTypeMember から継承されます。) |
![]() | Parameters | メソッドのパラメータ宣言を取得します。 ( CodeMemberMethod から継承されます。) |
![]() | PrivateImplementationType | このメソッドによってプライベート メソッドが実装されるインターフェイスがある場合に、そのインターフェイスのデータ型を取得または設定します。 ( CodeMemberMethod から継承されます。) |
![]() | ReturnType | メソッドの戻り値のデータ型を取得または設定します。 ( CodeMemberMethod から継承されます。) |
![]() | ReturnTypeCustomAttributes | メソッドの戻り値の型のカスタム属性を取得します。 ( CodeMemberMethod から継承されます。) |
![]() | StartDirectives | メンバの開始ディレクティブを取得します。 ( CodeTypeMember から継承されます。) |
![]() | Statements | メソッド内で、ステートメントを取得します。 ( CodeMemberMethod から継承されます。) |
![]() | TypeParameters | 現在のジェネリック メソッドの型パラメータを取得します。 ( CodeMemberMethod から継承されます。) |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。 ( CodeObject から継承されます。) |

CodeEntryPointMethod メソッド

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

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

CodeEntryPointMethod メンバ
CodeEntryPointMethod データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Attributes | メンバの属性を取得または設定します。(CodeTypeMember から継承されます。) |
![]() | Comments | 型メンバのコメント コレクションを取得します。(CodeTypeMember から継承されます。) |
![]() | CustomAttributes | メンバのカスタム属性を取得または設定します。(CodeTypeMember から継承されます。) |
![]() | EndDirectives | メンバの終了ディレクティブを取得します。(CodeTypeMember から継承されます。) |
![]() | ImplementationTypes | メソッドの実装が PrivateImplementationType プロパティで示されるプライベート メソッド実装である場合を除き、このメソッドによって実装されるインターフェイスのデータ型を取得します。(CodeMemberMethod から継承されます。) |
![]() | LinePragma | 型メンバのステートメントが発生する行を取得または設定します。(CodeTypeMember から継承されます。) |
![]() | Name | メンバの名前を取得または設定します。(CodeTypeMember から継承されます。) |
![]() | Parameters | メソッドのパラメータ宣言を取得します。(CodeMemberMethod から継承されます。) |
![]() | PrivateImplementationType | このメソッドによってプライベート メソッドが実装されるインターフェイスがある場合に、そのインターフェイスのデータ型を取得または設定します。(CodeMemberMethod から継承されます。) |
![]() | ReturnType | メソッドの戻り値のデータ型を取得または設定します。(CodeMemberMethod から継承されます。) |
![]() | ReturnTypeCustomAttributes | メソッドの戻り値の型のカスタム属性を取得します。(CodeMemberMethod から継承されます。) |
![]() | StartDirectives | メンバの開始ディレクティブを取得します。(CodeTypeMember から継承されます。) |
![]() | Statements | メソッド内で、ステートメントを取得します。(CodeMemberMethod から継承されます。) |
![]() | TypeParameters | 現在のジェネリック メソッドの型パラメータを取得します。(CodeMemberMethod から継承されます。) |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。(CodeObject から継承されます。) |

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

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

名前 | 説明 | |
---|---|---|
![]() | PopulateImplementationTypes | ImplementationTypes コレクションが最初にアクセスされたときに発生するイベント。(CodeMemberMethod から継承されます。) |
![]() | PopulateParameters | Parameters コレクションが最初にアクセスされたときに発生するイベント。(CodeMemberMethod から継承されます。) |
![]() | PopulateStatements | Statements コレクションが最初にアクセスされたときに発生するイベント。(CodeMemberMethod から継承されます。) |

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

- CodeEntryPointMethodのページへのリンク