Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Latest commit

 

History

History
63 lines (51 loc) · 1.68 KB

File metadata and controls

63 lines (51 loc) · 1.68 KB

PropertyMetadata class

Encapsulate property information

Declaration

internal class PropertyMetadata
{
    public string Name { get; set; }
    public Type Type { get; set; }
    public IList<string> Alias { get; set; }
    public MethodInfo SetMethod { get; set; }
    public MethodInfo GetMethod { get; set; }
    public Action<object, object> SetValue { get; set; }
    public Func<object, object> GetValue { get; set; }

    internal void CreateFastGetSetMethod(Type interfaceType);
}

Methdos

internal void CreateFastGetSetMethod(Type interfaceType);

Description: create getter/setter functions for input interface and assign them to property GetValue and SetValue.

interfaceType: interface to create property setter and getter.

Properties

public string Name { get; set; }

Description: property name

public Type Type { get; set; }

Description: property type

public IList<string> Alias { get; set; }

Description: alias list used with property

public MethodInfo SetMethod { get; set; }

Description: set method as returned from PropertyInfo.GetSetMethod()

public MethodInfo GetMethod { get; set; }

Description: get method as returned from PropertyInfo.GetGetMethod()

public Action<object, object> SetValue { get; set; }

Description: property setter created by CreateFastGetSetMethod.

public Func<object, object> GetValue { get; set; }

Description: property getter created by CreateFastGetSetMethod.