public void TestInitialize() { Log.Logger = new LoggerConfiguration() .MinimumLevel.Verbose() .WriteTo.Console() .Enrich.FromLogContext() .CreateLogger(); _itemInfos = AlliedModsWiki.GetItemInfos(); var itemInfoSource = new ItemInfoSource(_itemInfos); var classNameSource = new ClassNameSource(); _transformations = new Dictionary <string, ITransformation <Node> > { { "tf2rebalance_attributes", new Tf2RebalanceTransformation(itemInfoSource, classNameSource) }, { "Custom Attributes", new CustomAttributesTransformation(itemInfoSource, classNameSource) }, }; }
private static void Execute(IList <string> files, IRebalanceInfoFormatter formatter, IFileSystem fileSystem) { IDictionary <string, List <ItemInfo> > weaponNames = AlliedModsWiki.GetItemInfos(); var itemInfoSource = new ItemInfoSource(weaponNames); var classNameSource = new ClassNameSource(); var transformations = new Dictionary <string, ITransformation <Node> > { { "tf2rebalance_attributes", new Tf2RebalanceTransformation(itemInfoSource, classNameSource) }, { "Custom Attributes", new CustomAttributesTransformation(itemInfoSource, classNameSource) }, }; IConverter converter = new CompositeTf2FormatConverter(new ValveFormatParser(), transformations); foreach (string filename in files) { CreateSummary(filename, converter, formatter, fileSystem); } Log.Information("finished creating summaries for {ConfigFileCount} configs", files.Count); }