Esempio n. 1
0
 public CustomPropertyInfo CanRead(string localName, string version)
 {
     if (localName == SIMPLE_NAME)
     {
         CustomPropertyInfo result = new CustomPropertyInfo(typeof(string),
                                                            new DictionaryAttribute {
             NamespaceType = NamespaceType.Toolkit
         });
         return(result);
     }
     else if (fFactories.ContainsKey(localName))
     {
         CustomPropertyInfo result = new CustomPropertyInfo(typeof(Dictionary <string, object>),
                                                            new DynamicDictionaryAttribute(fFactories[localName]));
         return(result);
     }
     else if (fObjectConfig.ContainsKey(localName))
     {
         var attr = new ObjectElementAttribute
         {
             ObjectType = fObjectConfig[localName]
         };
         return(new CustomPropertyInfo(attr.ObjectType, attr));
     }
     return(null);
 }
 public CustomObjectPropertyInfo(string localName, ICustomReader reader,
                                 CustomPropertyInfo input, string version, string modelName)
     : base(input.Attribute, modelName)
 {
     fVersion   = version;
     fLocalName = localName;
     fReader    = reader;
     fType      = input.DataType;
     Converter  = input.Converter;
     fQName     = CreateQName(fLocalName);
 }