当前位置: 首页>>代码示例>>C#>>正文


C# CodeDom.CodeCommentStatementCollection类代码示例

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


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


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