Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 public static object StaticGetField(Type type, string fieldName)
 {
     return(ReflectorHelper.InvokeMember(
                type, null, fieldName,
                ReflectorHelper.CommonFlags | BindingFlags.GetField | BindingFlags.Static));
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public static object GetProperty(object target, string propertyName)
 {
     return(ReflectorHelper.InvokeMember(
                target.GetType(), target, propertyName,
                ReflectorHelper.CommonFlags | BindingFlags.GetProperty | BindingFlags.Instance));
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 public static void StaticSetField(Type type, string fieldName, object value)
 {
     ReflectorHelper.InvokeMember(
         type, null, fieldName,
         ReflectorHelper.CommonFlags | BindingFlags.SetField | BindingFlags.Static, value);
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 public static object GetField(object target, string fieldName)
 {
     return(ReflectorHelper.InvokeMember(
                target.GetType(), target, fieldName,
                ReflectorHelper.CommonFlags | BindingFlags.GetField | BindingFlags.Instance));
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 public static void SetProperty(object target, string propertyName, object value)
 {
     ReflectorHelper.InvokeMember(
         target.GetType(), target, propertyName,
         ReflectorHelper.CommonFlags | BindingFlags.SetProperty | BindingFlags.Instance, value);
 }
Exemplo n.º 6
0
 /// <summary>
 ///
 /// </summary>
 public static void SetField(object target, string fieldName, object value)
 {
     ReflectorHelper.InvokeMember(
         target.GetType(), target, fieldName,
         ReflectorHelper.CommonFlags | BindingFlags.SetField | BindingFlags.Instance, value);
 }
Exemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 public static object CreateInstance(Type type, params object[] args)
 {
     return(ReflectorHelper.InvokeMember(
                type, null, null,
                ReflectorHelper.CommonFlags | BindingFlags.CreateInstance | BindingFlags.Instance, args));
 }
Exemplo n.º 8
0
 /// <summary>
 ///
 /// </summary>
 public static object CallMethod(object target, string methodName, params object[] args)
 {
     return(ReflectorHelper.InvokeMember(
                target.GetType(), target, methodName,
                ReflectorHelper.CommonFlags | BindingFlags.InvokeMethod | BindingFlags.Instance, args));
 }
Exemplo n.º 9
0
 /// <summary>
 ///
 /// </summary>
 public static object StaticGetProperty(Type type, string propertyName)
 {
     return(ReflectorHelper.InvokeMember(
                type, null, propertyName,
                ReflectorHelper.CommonFlags | BindingFlags.GetProperty | BindingFlags.Static));
 }
Exemplo n.º 10
0
 /// <summary>
 ///
 /// </summary>
 public static void StaticSetProperty(Type type, string propertyName, object value)
 {
     ReflectorHelper.InvokeMember(
         type, null, propertyName,
         ReflectorHelper.CommonFlags | BindingFlags.SetProperty | BindingFlags.Static, value);
 }