Ejemplo n.º 1
0
 private static RadProperty DeserializePropertyCore(
     string property,
     bool fallback,
     bool throwOnError)
 {
     if (string.IsNullOrEmpty(property))
     {
         return((RadProperty)null);
     }
     string[] strArray = property.Split('.');
     if (strArray.Length > 1)
     {
         string      propertyName = strArray[strArray.Length - 1];
         string      className    = string.Join(".", strArray, 0, strArray.Length - 1);
         System.Type typeByName   = RadTypeResolver.Instance.GetTypeByName(className);
         if ((object)typeByName == null)
         {
             if (throwOnError)
             {
                 throw new InvalidOperationException("Could not look-up type '" + className + "'");
             }
             return((RadProperty)null);
         }
         RadProperty property1 = XmlPropertySetting.FindProperty(typeByName, propertyName, fallback);
         if (property1 != null)
         {
             return(property1);
         }
         if (!throwOnError)
         {
             return((RadProperty)null);
         }
         return(XmlPropertySetting.ProcessDuplicateAssemblies(propertyName, className));
     }
     if (throwOnError)
     {
         throw new Exception("Invalid property parts");
     }
     return((RadProperty)null);
 }