Ejemplo n.º 1
0
        public override void Bind(object obj, string name)
        {
            object value = MpReflection.GetValue(obj, name);
            Type   type  = value.GetType();

            Sync.WriteSyncObject(writer, value, type);
        }
Ejemplo n.º 2
0
        public override void Bind(object obj, string name)
        {
            object value = MpReflection.GetValue(obj, name);

            Type type = value.GetType();

            var res = Sync.ReadSyncObject(reader, type);

            MpReflection.SetValue(obj, name, res);
        }
Ejemplo n.º 3
0
 public static object GetPropertyOrField(this object obj, string memberPath, object index = null)
 {
     return(MpReflection.GetValue(obj, memberPath, index));
 }