Exemplo n.º 1
0
 public static void WriteComment(this SolutionProjectLanguage that, SolutionFile File, params XElement[] comments)
 {
     foreach (var comment in comments)
     {
         that.WriteComment(File, comment);
     }
 }
Exemplo n.º 2
0
        public static void WriteSummary(this SolutionProjectLanguage that, SolutionFile File, string summary, SolutionProjectLanguageArgument[] @params)
        {
            if (string.IsNullOrEmpty(summary))
            {
                return;
            }

            var c = new List <XElement>();


            c.Add(new XElement("summary", "\n" + summary + "\n"));

            if (@params != null)
            {
                foreach (var item in @params)
                {
                    c.Add(
                        new XElement("param",
                                     new XAttribute("name", item.Name),
                                     item.Summary
                                     )
                        );
                }
            }

            that.WriteComment(File, c.ToArray());
        }
        public void WriteTo(SolutionFile File, SolutionProjectLanguage Language, SolutionBuilder Context)
        {
            // X:\jsc.svn\examples\javascript\test\Test4IfNotNullIfFalse\Test4IfNotNullIfFalse\Class1.cs
            // X:\jsc.svn\core\ScriptCoreLib.Ultra.Library\ScriptCoreLib.Ultra.Library\Ultra\Studio\SolutionFileComment.cs
            // broken in roslyn?
            if (this.IsActiveFilter != null)
            {
                if (!this.IsActiveFilter(Context))
                {
                    return;
                }
            }

            if (Comment != null)
            {
                File.WriteIndent();
                Language.WriteCommentLine(File, Comment);
            }
            if (Link != null)
            {
                File.WriteIndent();
                Language.WriteLinkCommentLine(File, Link);
            }

            this.MarginBottom.Times(File.WriteLine);
        }
Exemplo n.º 4
0
 public static void WriteIndentedComment(this SolutionProjectLanguage that, SolutionFile File, string summary)
 {
     foreach (var item in summary.ToLines())
     {
         File.WriteIndent();
         that.WriteCommentLine(File, item);
     }
 }
Exemplo n.º 5
0
        public static void WriteSummary(this SolutionProjectLanguage that, SolutionFile File, string summary)
        {
            if (string.IsNullOrEmpty(summary))
            {
                return;
            }

            that.WriteSummary(File, summary, null);
        }
        public static void WriteUsingNamespaceList(this SolutionFile File, SolutionProjectLanguage Language, SolutionProjectLanguageType Type)
        {
            File.Region(
                delegate
                {
                    var ul = new GetUsingNamespaces(Type).Current.ToArray();
                    var ol = ul.OrderBy(k => k);

                    foreach (var item in ol)
                    {
                        Language.WriteUsingNamespace(File, item);
                    }
                }
            );
        }
Exemplo n.º 7
0
 public static void Write(this SolutionFile File, SolutionProjectLanguage Language, SolutionBuilder Context, SolutionFileComment[] Comments)
 {
     if (Comments != null)
     {
         File.Region(
             delegate
         {
             foreach (var item in Comments)
             {
                 item.WriteTo(File, Language, Context);
             }
         }
             );
     }
 }
Exemplo n.º 8
0
        public static void WriteUsingNamespaceList(this SolutionFile File, SolutionProjectLanguage Language, SolutionProjectLanguageType Type)
        {
            File.Region(
                delegate
            {
                var ul = new GetUsingNamespaces(Type).Current.ToArray();
                var ol = ul.OrderBy(k => k);

                foreach (var item in ol)
                {
                    Language.WriteUsingNamespace(File, item);
                }
            }
                );
        }
Exemplo n.º 9
0
        /// <summary>
        /// sadsad
        /// </summary>
        /// <param name="that">fsdfsdf</param>
        /// <param name="File">sdfsf</param>
        /// <param name="comment">sdg</param>
        public static void WriteComment(this SolutionProjectLanguage that, SolutionFile File, XElement comment)
        {
            var x = comment.ToString();

            var r = new StringReader(x);

            var n = r.ReadLine();

            while (n != null)
            {
                File.WriteIndent();
                that.WriteXMLCommentLine(File, n);

                n = r.ReadLine();
            }
        }
Exemplo n.º 10
0
        public static void Indent(this SolutionFile File, SolutionProjectLanguage Language, Action y)
        {
            File.IndentStack.Push(
                delegate
            {
                if (Language == null)
                {
                    File.Write(SolutionFileTextFragment.Indent, "\t");
                }
                else
                {
                    Language.WriteSingleIndent(File);
                }
            }
                );

            y();

            File.IndentStack.Pop();
        }
		public void WriteTo(SolutionFile File, SolutionProjectLanguage Language, SolutionBuilder Context)
		{
			// X:\jsc.svn\examples\javascript\test\Test4IfNotNullIfFalse\Test4IfNotNullIfFalse\Class1.cs
			// X:\jsc.svn\core\ScriptCoreLib.Ultra.Library\ScriptCoreLib.Ultra.Library\Ultra\Studio\SolutionFileComment.cs
			// broken in roslyn?
			if (this.IsActiveFilter != null)
				if (!this.IsActiveFilter(Context))
					return;

			if (Comment != null)
			{
				File.WriteIndent();
				Language.WriteCommentLine(File, Comment);
			}
			if (Link != null)
			{
				File.WriteIndent();
				Language.WriteLinkCommentLine(File, Link);
			}

			this.MarginBottom.Times(File.WriteLine);
		}
        public static void Write(this SolutionFile File, SolutionProjectLanguage Language, SolutionBuilder Context, SolutionFileComment[] Comments)
        {
            if (Comments != null)
            {
                File.Region(
                    delegate
                    {
                        foreach (var item in Comments)
                        {
                            item.WriteTo(File, Language, Context);

                        }
                    }
                );
            }
        }
        public static void Indent(this SolutionFile File, SolutionProjectLanguage Language, Action y)
        {
            File.IndentStack.Push(
                delegate
                {
                    if (Language == null)
                        File.Write(SolutionFileTextFragment.Indent, "\t");
                    else
                        Language.WriteSingleIndent(File);
                }
            );

            y();

            File.IndentStack.Pop();
        }