コード例 #1
0
        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();
            }
        }
コード例 #2
0
 public static IResourceTypeGenerator SubType <TBase>(this IResourceTypeGenerator generator)
 {
     return(generator.SubType(typeof(TBase)));
 }