private void SetPropertyState(PropertyInfo prop, ObjectState objState)
 {
     if (prop.PropertyType.IsSubclassOf(_self))
     {
         var value = prop.GetValue(this);
         prop.PropertyType.GetMethod("SetState").Invoke(value, new object[]{ objState.GetState(prop.Name) });
     }
     else prop.SetValue(this, objState.GetProp(prop.Name));
 }
 private void SetFieldState(FieldInfo field, ObjectState objState)
 {
     if (field.FieldType.IsSubclassOf(_self))
     {
         var value = field.GetValue(this);
         value.GetType().GetMethod("SetState").Invoke(value, new object[]{ objState.GetState(field.Name) });
     }
     else field.SetValue(this, objState.GetField(field.Name));
 }