• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CodeDom.CodeCommentStatementCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.CodeDom.CodeCommentStatementCollection的典型用法代码示例。如果您正苦于以下问题:C# CodeCommentStatementCollection类的具体用法?C# CodeCommentStatementCollection怎么用?C# CodeCommentStatementCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CodeCommentStatementCollection类属于System.CodeDom命名空间,在下文中一共展示了CodeCommentStatementCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CodeNamespace

 public CodeNamespace()
 {
     this.imports = new CodeNamespaceImportCollection();
     this.comments = new CodeCommentStatementCollection();
     this.classes = new CodeTypeDeclarationCollection();
     this.namespaces = new CodeNamespaceCollection();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:CodeNamespace.cs


示例2: Constructor1_NullItem

		public void Constructor1_NullItem ()
		{
			CodeCommentStatement[] statements = new CodeCommentStatement[] { 
				new CodeCommentStatement (), null };

			CodeCommentStatementCollection coll = new CodeCommentStatementCollection (
				statements);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:CodeCommentStatementCollectionTest.cs


示例3: CreateSummaryComment

 /// <summary>
 /// Add to CodeCommentStatementCollection summary documentation
 /// </summary>
 /// <param name="codeStatmentColl">Collection of CodeCommentStatement</param>
 /// <param name="comment">summary text</param>
 internal static void CreateSummaryComment(CodeCommentStatementCollection codeStatmentColl, string comment)
 {
     codeStatmentColl.Add(new CodeCommentStatement("<summary>", true));
     string[] lines = comment.Split(new[] { '\n' });
     foreach (string line in lines)
         codeStatmentColl.Add(new CodeCommentStatement(line.Trim(), true));
     codeStatmentColl.Add(new CodeCommentStatement("</summary>", true));
 }
开发者ID:flonou,项目名称:xsd2code,代码行数:13,代码来源:CodeDomHelper.cs


示例4: Clone

 public static CodeCommentStatementCollection Clone(CodeCommentStatementCollection codestatementcol)
 {
     var col = new CodeCommentStatementCollection();
     foreach(CodeCommentStatement cstat in codestatementcol) {
         col.Add(Clone(cstat));
     }
     return col;
 }
开发者ID:RaptorOne,项目名称:SmartDevelop,代码行数:8,代码来源:CloneHelper.cs


示例5: Constructor0

		public void Constructor0 ()
		{
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection ();
			Assert.IsFalse (((IList) coll).IsFixedSize, "#1");
			Assert.IsFalse (((IList) coll).IsReadOnly, "#2");
			Assert.AreEqual (0, coll.Count, "#3");
			Assert.IsFalse (((ICollection) coll).IsSynchronized, "#4");
			Assert.IsNotNull (((ICollection) coll).SyncRoot, "#5");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:CodeCommentStatementCollectionTest.cs


示例6: GetDocumentCommentString

 public static string GetDocumentCommentString(CodeCommentStatementCollection comments)
 {
     var info = new StringBuilder();
     foreach(CodeCommentStatement com in comments) {
         if(com.Comment.DocComment)
             info.AppendLine(com.Comment.Text);
     }
     return info.ToString();
 }
开发者ID:RaptorOne,项目名称:SmartDevelop,代码行数:9,代码来源:Helper.cs


示例7: Comment

 void Comment(Dictionary<string, Documentation> docs, string name, CodeCommentStatementCollection comments)
 {
     if (comments.Count > 0 && comments[0].Comment.Text == "<remarks/>") {
         comments.RemoveAt(0);
     }
     if (docs.ContainsKey(name)) {
         comments.Insert(0, new CodeCommentStatement("<summary>" + docs[name].Text + "</summary>", true));
         docs[name].Used = true;
     }
 }
开发者ID:dsrbecky,项目名称:ColladaDOM,代码行数:10,代码来源:DocumentationExtension.cs


示例8: EmitSummaryComments

        /// <summary>
        /// emit all the documentation comments for an element's documentation child
        /// (if the element does not have a documentation child emit some standard "missing comments" comment
        /// </summary>
        /// <param name="element">the element whose documentation is to be displayed</param>
        /// <param name="commentCollection">the comment collection of the CodeDom object to be commented</param>
        public static void EmitSummaryComments(MetadataItem item, CodeCommentStatementCollection commentCollection)
        {
            Debug.Assert(item != null, "item parameter is null");
            Debug.Assert(commentCollection != null, "commentCollection parameter is null");

            Documentation documentation = GetDocumentation(item);
            string [] summaryComments = null;
            if (documentation != null && !MetadataUtil.IsNullOrEmptyOrWhiteSpace(documentation.Summary)) 
            {
                // we have documentation to emit
                summaryComments = GetFormattedLines(documentation.Summary, true);
            }
            else
            {
                string summaryComment;
                // no summary content, so use a default
                switch (item.BuiltInTypeKind)
                {
                    case BuiltInTypeKind.EdmProperty:
                        summaryComment = Strings.MissingPropertyDocumentation(((EdmProperty)item).Name);
                        break;
                    case BuiltInTypeKind.ComplexType:
                        summaryComment = Strings.MissingComplexTypeDocumentation(((ComplexType)item).FullName);
                        break;
                    default:
                        {
                            PropertyInfo pi = item.GetType().GetProperty("FullName");
                            if (pi == null)
                            {
                                pi = item.GetType().GetProperty("Name");
                            }

                            object value = null;
                            if (pi != null)
                            {
                                value = pi.GetValue(item, null);
                            }


                            if (value != null)
                            {
                                summaryComment = Strings.MissingDocumentation(value.ToString());
                            }
                            else
                            {
                                summaryComment = Strings.MissingDocumentationNoName;
                            }
                        }
                        break;
                }
                summaryComments = new string[] { summaryComment };
            }
            EmitSummaryComments(summaryComments, commentCollection);
            EmitOtherDocumentationComments(documentation, commentCollection);
        }
开发者ID:uQr,项目名称:referencesource,代码行数:61,代码来源:CommentEmitter.cs


示例9: AddRange

 public void AddRange(CodeCommentStatementCollection value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     int count = value.Count;
     for (int i = 0; i < count; i++)
     {
         this.Add(value[i]);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:CodeCommentStatementCollection.cs


示例10: Constructor1

		public void Constructor1 ()
		{
			CodeCommentStatement ccs1 = new CodeCommentStatement ();
			CodeCommentStatement ccs2 = new CodeCommentStatement ();

			CodeCommentStatement[] statements = new CodeCommentStatement[] { ccs1, ccs2 };
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection (
				statements);

			Assert.AreEqual (2, coll.Count, "#1");
			Assert.AreEqual (0, coll.IndexOf (ccs1), "#2");
			Assert.AreEqual (1, coll.IndexOf (ccs2), "#3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:CodeCommentStatementCollectionTest.cs


示例11: Constructor1_Deny_Unrestricted

		public void Constructor1_Deny_Unrestricted ()
		{
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection (array);
			coll.CopyTo (array, 0);
			Assert.AreEqual (1, coll.Add (ccs), "Add");
			Assert.AreSame (ccs, coll[0], "this[int]");
			coll.AddRange (array);
			coll.AddRange (coll);
			Assert.IsTrue (coll.Contains (ccs), "Contains");
			Assert.AreEqual (0, coll.IndexOf (ccs), "IndexOf");
			coll.Insert (0, ccs);
			coll.Remove (ccs);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:CodeCommentStatementCollectionCas.cs


示例12: AddFileBanner

		private CodeCommentStatementCollection AddFileBanner(string sInFile, string sOutFile)
		{
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection();

			coll.Add(new CodeCommentStatement("--------------------------------------------------------------------------------------------"));
			coll.Add(new CodeCommentStatement(string.Format(
				"Copyright (c) {0}, SIL International. All rights reserved.", DateTime.Now.Year)));
			coll.Add(new CodeCommentStatement(""));
			coll.Add(new CodeCommentStatement("File: " + Path.GetFileName(sOutFile)));
			coll.Add(new CodeCommentStatement("Responsibility: Generated by IDLImporter"));
			coll.Add(new CodeCommentStatement("Last reviewed: "));
			coll.Add(new CodeCommentStatement(""));
			coll.Add(new CodeCommentStatement("<remarks>"));
			coll.Add(new CodeCommentStatement("Generated by IDLImporter from file " + Path.GetFileName(sInFile)));
			coll.Add(new CodeCommentStatement(""));
			coll.Add(new CodeCommentStatement("You should use these interfaces when you access the COM objects defined in the mentioned"));
			coll.Add(new CodeCommentStatement("IDL/IDH file."));
			coll.Add(new CodeCommentStatement("</remarks>"));
			coll.Add(new CodeCommentStatement("--------------------------------------------------------------------------------------------"));
			return coll;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:21,代码来源:IDLImporter.cs


示例13: AddExtensionWarningComments

 public void AddExtensionWarningComments(CodeCommentStatementCollection comments, ServiceDescriptionFormatExtensionCollection extensions)
 {
     foreach (object obj2 in extensions)
     {
         if (!extensions.IsHandled(obj2))
         {
             string localName = null;
             string namespaceURI = null;
             if (obj2 is XmlElement)
             {
                 XmlElement element = (XmlElement) obj2;
                 localName = element.LocalName;
                 namespaceURI = element.NamespaceURI;
             }
             else if (obj2 is ServiceDescriptionFormatExtension)
             {
                 XmlFormatExtensionAttribute[] customAttributes = (XmlFormatExtensionAttribute[]) obj2.GetType().GetCustomAttributes(typeof(XmlFormatExtensionAttribute), false);
                 if (customAttributes.Length > 0)
                 {
                     localName = customAttributes[0].ElementName;
                     namespaceURI = customAttributes[0].Namespace;
                 }
             }
             if (localName != null)
             {
                 if (extensions.IsRequired(obj2))
                 {
                     this.warnings |= ServiceDescriptionImportWarnings.RequiredExtensionsIgnored;
                     AddWarningComment(comments, System.Web.Services.Res.GetString("WebServiceDescriptionIgnoredRequired", new object[] { localName, namespaceURI }));
                 }
                 else
                 {
                     this.warnings |= ServiceDescriptionImportWarnings.OptionalExtensionsIgnored;
                     AddWarningComment(comments, System.Web.Services.Res.GetString("WebServiceDescriptionIgnoredOptional", new object[] { localName, namespaceURI }));
                 }
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:39,代码来源:ProtocolImporter.cs


示例14: Constructor1_Null

		public void Constructor1_Null () {
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection (
				(CodeCommentStatement[]) null);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:CodeCommentStatementCollectionTest.cs


示例15: GenerateCommentStatements

 protected override void GenerateCommentStatements(CodeCommentStatementCollection e)
 {
     foreach (CodeCommentStatement statement in e)
     {
         if (!this.IsDocComment(statement))
         {
             this.GenerateCommentStatement(statement);
         }
     }
     foreach (CodeCommentStatement statement2 in e)
     {
         if (this.IsDocComment(statement2))
         {
             this.GenerateCommentStatement(statement2);
         }
     }
 }
开发者ID:laymain,项目名称:CodeDomUtils,代码行数:17,代码来源:VBCodeGenerator.cs


示例16: AddSummary

        private static void AddSummary(CodeCommentStatementCollection comments, string summary)
        {
            if (String.IsNullOrEmpty(summary))
                return;

            comments.Add(new CodeCommentStatement("<summary>", true));
            comments.Add(new CodeCommentStatement(Util.XmlEncode(summary), true));
            comments.Add(new CodeCommentStatement("</summary>", true));
        }
开发者ID:biapar,项目名称:ovhapicil,代码行数:9,代码来源:ModelGenerator.cs


示例17: EmitXmlComments

        /// <summary>
        /// emit documentation comments between xml open and close tags
        /// </summary>
        /// <param name="tag">the xml tag name</param>
        /// <param name="summaryComments">the lines of comments to emit</param>
        /// <param name="commentCollection">the comment collection of the CodeDom object to be commented</param>
        private static void EmitXmlComments(string tag, string[] summaryComments, CodeCommentStatementCollection commentCollection)
        {
            Debug.Assert(tag != null);
            Debug.Assert(summaryComments != null);
            Debug.Assert(commentCollection != null);

            commentCollection.Add(new CodeCommentStatement(string.Format(CultureInfo.InvariantCulture, "<{0}>", tag), true));
            EmitComments(summaryComments, commentCollection, true);
            commentCollection.Add(new CodeCommentStatement(string.Format(CultureInfo.InvariantCulture, "</{0}>", tag), true));
        }
开发者ID:uQr,项目名称:referencesource,代码行数:16,代码来源:CommentEmitter.cs


示例18: Remove_Null

		public void Remove_Null ()
		{
			CodeCommentStatementCollection coll = new CodeCommentStatementCollection ();
			coll.Remove ((CodeCommentStatement) null);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:5,代码来源:CodeCommentStatementCollectionTest.cs


示例19: EmitOtherDocumentationComments

        /// <summary>
        /// Emit the other (than Summary) documentation comments from a Documentation element
        /// </summary>
        /// <param name="documentation">the schema Docuementation element</param>
        /// <param name="commentCollection">the comment collection of the CodeDom object to be commented</param>
        private static void EmitOtherDocumentationComments(Documentation documentation, CodeCommentStatementCollection commentCollection)
        {
            Debug.Assert(commentCollection != null);
            if (documentation == null)
                return;

            if (!string.IsNullOrEmpty(documentation.LongDescription))
                EmitXmlComments("LongDescription", GetFormattedLines(documentation.LongDescription, true), commentCollection);
        }
开发者ID:uQr,项目名称:referencesource,代码行数:14,代码来源:CommentEmitter.cs


示例20: EmitParamComments

        /// <summary>
        /// Emit documentation comments for a method parameter
        /// </summary>
        /// <param name="parameter">the parameter being commented</param>
        /// <param name="comment">the comment text</param>
        /// <param name="commentCollection">the comment collection of the CodeDom object to be commented</param>
        public static void EmitParamComments(CodeParameterDeclarationExpression parameter, string comment,
            CodeCommentStatementCollection commentCollection)
        {
            Debug.Assert(parameter != null, "parameter parameter is null");
            Debug.Assert(comment != null, "comment parameter is null");

            string paramComment = string.Format(System.Globalization.CultureInfo.CurrentCulture,
                "<param name=\"{0}\">{1}</param>", parameter.Name, comment);
            commentCollection.Add(new CodeCommentStatement(paramComment, true));
        }
开发者ID:uQr,项目名称:referencesource,代码行数:16,代码来源:CommentEmitter.cs



注:本文中的System.CodeDom.CodeCommentStatementCollection类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CodeDom.CodeCompileUnit类代码示例发布时间:2022-05-26
下一篇:
C# CodeDom.CodeCommentStatement类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap