Ejemplo n.º 1
0
        private void DoOneClassExport(StreamWriter writer, NamespaceMethodBlok parent, ConfigRoleEnum article)
        {
            string articleClassName = GeneralNamesFactory.ClassNameFor("", ROLE_NAME_CLASS_PATTERN, article.GetSymbol());

            ClassMethodBlok classBlok = new ClassMethodBlok(parent, article, articleClassName);

            classBlok.StartBlok(writer);
            classBlok.BlokBody(writer);
            classBlok.CloseBlok(writer);
        }
Ejemplo n.º 2
0
        private void DoOneClassFileExport(string filesFolder, ConfigRoleEnum article)
        {
            string articleClassName = GeneralNamesFactory.ClassNameFor(ROLE_NAME_CLASS_POSTFIX, ROLE_NAME_CLASS_PATTERN, article.GetSymbol());

            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")))
            {
                NamespaceMethodBlok namespeceBlok = new NamespaceMethodBlok(ROLE_NAME_SPACE_PATTERN);

                namespeceBlok.StartBlok(genSourceWriter);

                DoOneClassExport(genSourceWriter, namespeceBlok, article);

                namespeceBlok.CloseBlok(genSourceWriter);

                genSourceWriter.Flush();
            }
        }