public static void Generate(this IResourceTypeGenerator generator, string sourceCodePath) { var file = new FileInfo(sourceCodePath); if (!file.Directory.Exists) { file.Directory.Create(); } using (var writer = new StreamWriter(file.Open(FileMode.Create))) { generator.Generate(writer); writer.Flush(); } }
public static IResourceTypeGenerator SubType <TBase>(this IResourceTypeGenerator generator) { return(generator.SubType(typeof(TBase))); }