本文整理汇总了C#中CodeElement类的典型用法代码示例。如果您正苦于以下问题:C#CodeElement类的具体用法?C#CodeElement怎么用?C#CodeElement使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:AddCommentsTo privatestaticvoidAddCommentsTo(CodeElementcodeElement) { if(CodeElementsThatNeedDocComment.Contains(codeElement.Kind)) { if(string.IsNullOrWhiteSpace(codeElement.GetDocComment())) { if(codeElement.IsInherited()||codeElement.OverridesSomething()) { codeElement.SetDocComment(@"
"); } else { switch(codeElement.Kind) { casevsCMElement.vsCMElementProperty:AddDocCommentToProperty(codeElementasCodeProperty);break; casevsCMElement.vsCMElementFunction:AddDocCommentToFunction(codeElementasCodeFunction);break; casevsCMElement.vsCMElementEnum:AddGhostDogCommand(codeElement);break; casevsCMElement.vsCMElementStruct:AddGhostDogCommand(codeElement);break; casevsCMElement.vsCMElementInterface:AddDocCommentToInterface(codeElementasCodeInterface);break; casevsCMElement.vsCMElementEvent:AddGhostDogCommand(codeElement);break; casevsCMElement.vsCMElementClass:AddDocCommentToClass(codeElementasCodeClass);break; casevsCMElement.vsCMElementVariable:AddGhostDogCommand(codeElement);break; } } } }
if(CodeElementsWithChildren.Contains(codeElement.Kind)) { foreach(CodeElementchildincodeElement.Children) { AddCommentsTo(child); } } }
原文链接:
http://www.jxszl.com/biancheng/C/556798.html