/// <summary> /// 得到按照Category过滤的Schema定义集合 /// </summary> /// <param name="categoryName"></param> /// <returns></returns> public static SchemaInfoCollection FilterByCategory(string categoryName) { SchemaInfoCollection schemas = new SchemaInfoCollection(); schemas.LoadFromConfiguration(); SchemaInfoCollection filtered = schemas.FilterByCategory(categoryName); return(filtered); }
/// <summary> /// 得到按照Category过滤的Schema定义集合 /// </summary> /// <param name="categoryNames"></param> /// <returns></returns> public static SchemaInfoCollection FilterByCategory(params string[] categoryNames) { SchemaInfoCollection result = new SchemaInfoCollection(); SchemaInfoCollection schemas = new SchemaInfoCollection(); schemas.LoadFromConfiguration(); foreach (string categoryName in categoryNames) { SchemaInfoCollection filtered = schemas.FilterByCategory(categoryName); filtered.ForEach(s => result.AddNotExistsItem(s)); } return(result); }