private void DoOneClassExport(StreamWriter writer, NamespaceTargetBlok parent, ArticleDefinition article) { string articleClassName = article.ClassName(); ClassTargetBlok classBlok = new ClassTargetBlok(parent, article.Article, articleClassName); classBlok.StartBlok(writer); classBlok.BlokBody(writer); classBlok.CloseBlok(writer); }
private void DoOneClassFileExport(string filesFolder, ArticleDefinition article) { string articleClassName = article.FullClassName(); string genSourcePath = System.IO.Path.Combine(filesFolder, articleClassName + ".cs"); FileInfo genSourceFile = new FileInfo(genSourcePath); FileStream genSourceStream = genSourceFile.Create(); using (StreamWriter genSourceWriter = new StreamWriter(genSourceStream, System.Text.Encoding.GetEncoding("windows-1250"))) { NamespaceTargetBlok namespeceBlok = new NamespaceTargetBlok(NAME_SPACE_PREFIX); namespeceBlok.StartBlok(genSourceWriter); DoOneClassExport(genSourceWriter, namespeceBlok, article); namespeceBlok.CloseBlok(genSourceWriter); genSourceWriter.Flush(); } }