Ejemplo n.º 1
0
 public MemberMeta(TypeMeta owner, string name, Type type)
 {
     DeclaringType = owner;
     Name          = name;
     MemberType    = type;
     IsViewModel   = ViewModelTypes.IsViewModel(type);
     IsCollection  = typeof(IEnumerable).IsAssignableFromPortable(MemberType) && MemberType != typeof(string);
 }
Ejemplo n.º 2
0
 public MemberMeta(TypeMeta owner, string name, Type type)
 {
     DeclaringType          = owner;
     Name                   = name;
     MemberType             = type;
     IsViewModel            = ViewModelTypes.IsViewModel(type);
     IsCollection           = typeof(IEnumerable).IsAssignableFromPortable(MemberType) && MemberType != typeof(string);
     IsObservableCollection = typeof(INotifyCollectionChanged).IsAssignableFromPortable(type) ||
                              IsBindingList(type);
 }
Ejemplo n.º 3
0
 protected object WrapValue(object value)
 {
     if (!Member.IsCollection && !Member.IsViewModel)
     {
         return(value);
     }
     if (value == null)
     {
         return(null);
     }
     if (!ViewModelTypes.IsViewModel(value.GetType()))
     {
         return(value);
     }
     return(Proxy.WrapObject(value));
 }