CodeMethodInvokeExpression
メンバ
コンストラクタ
- public CodeMethodInvokeExpression();
-
- 概要
- System.CodeDom.CodeMethodInvokeExpression クラスの新しいインスタンスを初期化します。
- public CodeMethodInvokeExpression( CodeMethodReferenceExpression method, params CodeExpression [] parameters );
-
- 概要
- 新しいインスタンスを初期化、 System.CodeDom.CodeMethodInvokeExpression クラスの指定されたメソッドとパラメーターを使用します。
- パラメーター
-
- method
- A System.CodeDom.CodeMethodReferenceExpression を呼び出す方法を示します。
- parameters
- 配列 System.CodeDom.CodeExpression メソッドの呼び出しに使用するパラメーターを指定するオブジェクト。
- public CodeMethodInvokeExpression( CodeExpression targetObject, string methodName, params CodeExpression [] parameters );
-
- 概要
- 対象オブジェクト、メソッド名、およびパラメーターを指定して、CodeMethodInvokeExpression クラスの新しいインスタンスを初期化します。
- パラメーター
-
- targetObject
- A System.CodeDom.CodeExpression を呼び出すメソッドを使用して、ターゲット オブジェクトを示します。
- methodName
- 呼び出すメソッドの名前。
- parameters
- 配列 System.CodeDom.CodeExpression でメソッドを呼び出すパラメーターを指定するオブジェクト。
プロパティ
- public CodeMethodReferenceExpression Method{ get; set; }
-
- 概要
- 呼び出されるメソッドを取得または設定します。
- 戻り値
- A System.CodeDom.CodeMethodReferenceExpression を呼び出す方法を示します。
-
public
CodeExpressionCollection
Parameters{ get; }
【 CodeExpression 】 -
- 概要
- メソッドの呼び出しのパラメーターを取得します。
- 戻り値
- A System.CodeDom.CodeExpressionCollection メソッドの呼び出しのパラメーターを示します。
- UserData
- 現在のオブジェクトのユーザー定義可能なデータを取得します。 (Inherited from CodeObject )
メソッド
- Equals(Object)
- 指定したオブジェクトが、現在のオブジェクトと等しいかどうかを判断します。 (Inherited from Object)
- GetHashCode()
- 既定のハッシュ関数として機能します。 (Inherited from Object)
- GetType()
- 現在のインスタンスの Type を取得します。 (Inherited from Object)
- MemberwiseClone()
- 現在の Object の簡易コピーを作成します。 (Inherited from Object)
- ToString()
- 現在のオブジェクトを表す文字列を返します。 (Inherited from Object)
例
この例では、CodeMethodInvokeExpressionメソッドを呼び出します。
CodeMethodInvokeExpression methodInvoke =
new CodeMethodInvokeExpression(
// targetObject that contains the method to invoke.
// もたらす方法を含んでいるtargetObject。
new CodeThisReferenceExpression(),
// methodName indicates the method to invoke.
// methodNameは、もたらす方法を示す。
"Dispose",
// parameters array contains the parameters for the method.
// パラメータ配列は方法のためのパラメータを含んでいる。
new CodeExpression[] { new CodePrimitiveExpression(true) }
);
// A C# code generator produces the following source code for the preceeding example code:
// A C#コードジェネレータはpreceeding例コードのための以下のソースコードを作り出す:
// this.Dispose(true);
定義
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Serializable]
public class CodeMethodInvokeExpression : System.CodeDom.CodeExpression
クラス
#region アセンブリ System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:¥Program Files (x86)¥Reference Assemblies¥Microsoft¥Framework¥.NETFramework¥v4.6.1¥System.dll
#endregion
using System.Runtime.InteropServices;
namespace System.CodeDom
{
//
// 概要:
// メソッドを呼び出す式を表します。
[ClassInterface( ClassInterfaceType.AutoDispatch )]
[ComVisible( true )]
public class CodeMethodInvokeExpression : CodeExpression
{
//
// 概要:
// System.CodeDom.CodeMethodInvokeExpression クラスの新しいインスタンスを初期化します。
public CodeMethodInvokeExpression();
//
// 概要:
// 新しいインスタンスを初期化、 System.CodeDom.CodeMethodInvokeExpression クラスの指定されたメソッドとパラメーターを使用します。
//
// パラメーター:
// method:
// A System.CodeDom.CodeMethodReferenceExpression を呼び出す方法を示します。
//
// parameters:
// 配列 System.CodeDom.CodeExpression メソッドの呼び出しに使用するパラメーターを指定するオブジェクト。
public CodeMethodInvokeExpression( CodeMethodReferenceExpression method, params CodeExpression[] parameters );
//
// 概要:
// 新しいインスタンスを初期化、 System.CodeDom.CodeMethodInvokeExpression クラスの指定した対象オブジェクト、メソッド名とパラメーターを使用します。
//
// パラメーター:
// targetObject:
// A System.CodeDom.CodeExpression を呼び出すメソッドを使用して、ターゲット オブジェクトを示します。
//
// methodName:
// 呼び出すメソッドの名前。
//
// parameters:
// 配列 System.CodeDom.CodeExpression でメソッドを呼び出すパラメーターを指定するオブジェクト。
public CodeMethodInvokeExpression( CodeExpression targetObject, string methodName, params CodeExpression[] parameters );
//
// 概要:
// 取得または設定に呼び出すメソッド。
//
// 戻り値:
// A System.CodeDom.CodeMethodReferenceExpression を呼び出す方法を示します。
public CodeMethodReferenceExpression Method
{
get;
set;
}
//
// 概要:
// メソッドの呼び出しのパラメーターを取得します。
//
// 戻り値:
// A System.CodeDom.CodeExpressionCollection メソッドの呼び出しのパラメーターを示します。
public CodeExpressionCollection Parameters
{
get;
}
}
}