Пример #1
0
 public Class FindClass(string name)
 {
     if (name.Contains("."))
     {
         var split = name.PoSplitOnce('.');
         var self  = FindClass(split[0]);
         if (self == null)
         {
             return(null);
         }
         return(self.FindClass(split[1]));
     }
     else
     {
         var target = ChildClasses.FirstOrDefault(o => o.Name == name);
         var parent = GetParentClass();
         if (target == null && parent != null)
         {
             return(parent.FindClass(name));
         }
         return(target);
     }
 }
 public static string ToJson(this ChildClasses self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);