Class Method
Definition class for methods.
Inheritance
System.Object
    System.Dynamic.DynamicObject
    
    
    
    
    Method
  Implements
System.Dynamic.IDynamicMetaObjectProvider
    
    
  Inherited Members
      System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
    
    
      System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
    
    
      System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
    
    
      System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
    
    
      System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
    
    
      System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
    
    
      System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
    
    
      System.Dynamic.DynamicObject.TryInvoke(System.Dynamic.InvokeBinder, System.Object[], System.Object)
    
    
      System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
    
    
      System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
  Namespace: Kephas.Model.Elements
Assembly: Kephas.Model.dll
Syntax
public class Method : ModelElementBase<IMethod>, IConstructibleElement, IMethod, IModelElement, INamedElement, IAggregatedElementInfo, IMethodInfo, IElementInfo, IExpando, IDynamicMetaObjectProvider, IIndexable, IAttributeProviderConstructors
| Improve this Doc View SourceMethod(IModelConstructionContext, String)
Initializes a new instance of the Method class.
Declaration
public Method(IModelConstructionContext constructionContext, string name)Parameters
| Type | Name | Description | 
|---|---|---|
| IModelConstructionContext | constructionContext | Context for the construction. | 
| System.String | name | The name. | 
Properties
| Improve this Doc View SourceParameters
Gets the method parameters.
Declaration
public IEnumerable<IParameterInfo> Parameters { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<IParameterInfo> | The method parameters. | 
ReturnType
Gets or sets the return type of the method.
Declaration
public ITypeInfo ReturnType { get; protected set; }Property Value
| Type | Description | 
|---|---|
| ITypeInfo | The return type of the method. | 
Methods
| Improve this Doc View SourceComputeReturnType()
Calculates the property type.
Declaration
protected virtual ITypeInfo ComputeReturnType()Returns
| Type | Description | 
|---|---|
| ITypeInfo | The calculated property type. | 
Exceptions
| Type | Condition | 
|---|---|
| ModelException | Thrown when the property has no parts which can be used to get the classifier. | 
Invoke(Object, IEnumerable<Object>)
Invokes the specified method on the provided instance.
Declaration
public object Invoke(object instance, IEnumerable<object> args)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | instance | The instance. | 
| System.Collections.Generic.IEnumerable<System.Object> | args | The arguments. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The invocation result. | 
TryGetRuntimeMethodInfo()
Tries to get the runtime method information for this method.
Declaration
protected virtual IRuntimeMethodInfo TryGetRuntimeMethodInfo()Returns
| Type | Description | 
|---|---|
| IRuntimeMethodInfo | A IRuntimeMethodInfo or  | 
Implements
      System.Dynamic.IDynamicMetaObjectProvider