public ArticleDefinition AddResults(params ArticleParametr[] arg)
        {
            IList <ArticleParametr> defnResults = arg.ToList();

            ArticleDefinition defn = new ArticleDefinition(this.Article, this.ArticleSources, defnResults);

            return(defn);
        }
 public ClassArticleResultBlok(ArticleRole code, ArticleDefinition defs, string name) : base()
 {
     ClassCode     = code;
     ClassDefs     = defs;
     ClassName     = name;
     FullClassName = name + NAME_ARTICLE_POSTFIX;
     ValsClassName = name + NAME_SOURCES_POSTFIX;
 }
Пример #3
0
 public ClassArticleValuesBlok(SourceBlokBase parent, ArticleRole code, ArticleDefinition defs, string name) : base(parent)
 {
     ClassCode     = code;
     ClassDefs     = defs;
     ClassName     = name;
     FullClassName = name + NAME_ARTICLE_POSTFIX;
     ValsClassName = name + NAME_SOURCES_POSTFIX;
 }
        public static ArticleDefinition Create(ArticleRole article, params ArticleParametr[] arg)
        {
            IList <ArticleParametr> defnSources = arg.ToList();
            IList <ArticleParametr> defnResults = new List <ArticleParametr>();

            ArticleDefinition defn = new ArticleDefinition(article, defnSources, defnResults);

            return(defn);
        }
Пример #5
0
        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();
            }
        }
Пример #6
0
        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);
        }