Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 public static object GetPropertyOrField(this object obj, string memberPath, object index = null)
 {
     return(MpReflection.GetValue(obj, memberPath, index));
 }