Esempio 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);
 }
Esempio 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);
 }
Esempio 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));
 }