コード例 #1
0
        public override Type GetObjType(Type propertyType, string name)
        {
            if (ObjectType != null)
            {
                return(ObjectType);
            }

            return(ObjectUtil.GetDictionaryValueType(propertyType, name, this));
        }
コード例 #2
0
        private static BaseDictionaryAttribute GetDictionaryAttribute(object receiver, QName root)
        {
            Type                    valueType = ObjectUtil.GetDictionaryValueType(receiver.GetType(), "", null);
            ITkTypeConverter        converter = TkTypeDescriptor.GetSimpleConverter(valueType);
            BaseDictionaryAttribute attr;

            if (converter == null)
            {
                attr = new ObjectDictionaryAttribute {
                    ObjectType = valueType
                }
            }
            ;
            else
            {
                attr = new DictionaryAttribute {
                    ObjectType = valueType
                }
            };

            attr.Assign(root);
            return(attr);
        }