當前位置: 首頁>>代碼示例>>C#>>正文


C# CSharp.DocumentationBuilder類代碼示例

本文整理匯總了C#中Mono.CSharp.DocumentationBuilder的典型用法代碼示例。如果您正苦於以下問題:C# DocumentationBuilder類的具體用法?C# DocumentationBuilder怎麽用?C# DocumentationBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DocumentationBuilder類屬於Mono.CSharp命名空間,在下文中一共展示了DocumentationBuilder類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GenerateDocComment

		internal override void GenerateDocComment (DocumentationBuilder builder)
		{
			base.GenerateDocComment (builder);

			if (DefaultStaticConstructor != null)
				DefaultStaticConstructor.GenerateDocComment (builder);

			if (InstanceConstructors != null)
				foreach (Constructor c in InstanceConstructors)
					c.GenerateDocComment (builder);

			if (Types != null)
				foreach (TypeContainer tc in Types)
					tc.GenerateDocComment (builder);

			if (Constants != null)
				foreach (Const c in Constants)
					c.GenerateDocComment (builder);

			if (Fields != null)
				foreach (FieldBase f in Fields)
					f.GenerateDocComment (builder);

			if (Events != null)
				foreach (Event e in Events)
					e.GenerateDocComment (builder);

			if (Indexers != null)
				foreach (Indexer ix in Indexers)
					ix.GenerateDocComment (builder);

			if (Properties != null)
				foreach (Property p in Properties)
					p.GenerateDocComment (builder);

			if (Methods != null)
				foreach (MethodOrOperator m in Methods)
					m.GenerateDocComment (builder);

			if (Operators != null)
				foreach (Operator o in Operators)
					o.GenerateDocComment (builder);
		}
開發者ID:jordanbtucker,項目名稱:mono,代碼行數:43,代碼來源:class.cs

示例2: GenerateDocComment

		internal override void GenerateDocComment (DocumentationBuilder builder)
		{
			if (IsPartialPart)
				return;

			base.GenerateDocComment (builder);

			foreach (var member in members)
				member.GenerateDocComment (builder);
		}
開發者ID:fvalette,項目名稱:mono,代碼行數:10,代碼來源:class.cs

示例3: GenerateDocComment

 public override void GenerateDocComment(DocumentationBuilder builder)
 {
     if (containers != null) {
         foreach (var tc in containers)
             tc.GenerateDocComment (builder);
     }
 }
開發者ID:exodrifter,項目名稱:mcs-ICodeCompiler,代碼行數:7,代碼來源:namespace.cs

示例4: ConvertXmlDoc

			public DocumentationReference ConvertXmlDoc(DocumentationBuilder doc)
			{
				var result = new DocumentationReference();
				if (doc.ParsedName != null) {
					if (doc.ParsedName.Name == "<this>") {
						result.SymbolKind = SymbolKind.Indexer;
					} else {
						result.MemberName = doc.ParsedName.Name;
					}
					if (doc.ParsedName.Left != null) {
						result.DeclaringType = ConvertToType(doc.ParsedName.Left);
					} else if (doc.ParsedBuiltinType != null) {
						result.DeclaringType = ConvertToType(doc.ParsedBuiltinType);
					}
					if (doc.ParsedName.TypeParameters != null) {
						for (int i = 0; i < doc.ParsedName.TypeParameters.Count; i++) {
							result.TypeArguments.Add(ConvertToType(doc.ParsedName.TypeParameters [i]));
						}
					}
				} else if (doc.ParsedBuiltinType != null) {
					result.SymbolKind = SymbolKind.TypeDefinition;
					result.DeclaringType = ConvertToType(doc.ParsedBuiltinType);
				}
				if (doc.ParsedParameters != null) {
					result.HasParameterList = true;
					result.Parameters.AddRange(doc.ParsedParameters.Select(ConvertXmlDocParameter));
				}
				if (doc.ParsedOperator != null) {
					result.SymbolKind = SymbolKind.Operator;
					result.OperatorType = (OperatorType)doc.ParsedOperator;
					if (result.OperatorType == OperatorType.Implicit || result.OperatorType == OperatorType.Explicit) {
						var returnTypeParam = result.Parameters.LastOrNullObject();
						returnTypeParam.Remove(); // detach from parameter list
						var returnType = returnTypeParam.Type;
						returnType.Remove();
						result.ConversionOperatorReturnType = returnType;
					}
					if (result.Parameters.Count == 0) {
						// reset HasParameterList if necessary
						result.HasParameterList = false;
					}
				}
				return result;
			}
開發者ID:0xb1dd1e,項目名稱:NRefactory,代碼行數:44,代碼來源:CSharpParser.cs

示例5: GenerateDocComment

		//
		// Generates xml doc comments (if any), and if required,
		// handle warning report.
		//
		internal virtual void GenerateDocComment (DocumentationBuilder builder)
		{
			if (DocComment == null) {
				if (IsExposedFromAssembly ()) {
					Constructor c = this as Constructor;
					if (c == null || !c.IsDefault ())
						Report.Warning (1591, 4, Location,
							"Missing XML comment for publicly visible type or member `{0}'", GetSignatureForError ());
				}

				return;
			}

			try {
				builder.GenerateDocumentationForMember (this);
			} catch (Exception e) {
				throw new InternalErrorException (this, e);
			}
		}
開發者ID:constructor-igor,項目名稱:cudafy,代碼行數:23,代碼來源:decl.cs

示例6: GenerateDocComment

		internal override void GenerateDocComment (DocumentationBuilder builder)
		{
			base.GenerateDocComment (builder);

			foreach (var member in members)
				member.GenerateDocComment (builder);
		}
開發者ID:xamarin-release-manager,項目名稱:monodevelop,代碼行數:7,代碼來源:class.cs

示例7: Compile


//.........這裏部分代碼省略.........
				}
			}

#if STATIC
			var importer = new StaticImporter (module);
			var references_loader = new StaticLoader (importer, ctx);

			tr.Start (TimeReporter.TimerType.AssemblyBuilderSetup);
			var assembly = new AssemblyDefinitionStatic (module, references_loader, output_file_name, output_file);
			assembly.Create (references_loader.Domain);
			tr.Stop (TimeReporter.TimerType.AssemblyBuilderSetup);

			// Create compiler types first even before any referenced
			// assembly is loaded to allow forward referenced types from
			// loaded assembly into compiled builder to be resolved
			// correctly
			tr.Start (TimeReporter.TimerType.CreateTypeTotal);
			module.CreateContainer ();
			importer.AddCompiledAssembly (assembly);
			tr.Stop (TimeReporter.TimerType.CreateTypeTotal);

			references_loader.LoadReferences (module);

			tr.Start (TimeReporter.TimerType.PredefinedTypesInit);
			if (!ctx.BuiltinTypes.CheckDefinitions (module))
				return false;

			tr.Stop (TimeReporter.TimerType.PredefinedTypesInit);

			references_loader.LoadModules (assembly, module.GlobalRootNamespace);
#else
			var assembly = new AssemblyDefinitionDynamic (module, output_file_name, output_file);
			module.SetDeclaringAssembly (assembly);

			var importer = new ReflectionImporter (module, ctx.BuiltinTypes);
			assembly.Importer = importer;

			var loader = new DynamicLoader (importer, ctx);
			loader.LoadReferences (module);

			if (!ctx.BuiltinTypes.CheckDefinitions (module))
				return false;

			if (!assembly.Create (AppDomain.CurrentDomain, AssemblyBuilderAccess.Save))
				return false;

			module.CreateContainer ();

			loader.LoadModules (assembly, module.GlobalRootNamespace);
#endif
			module.InitializePredefinedTypes ();

			tr.Start (TimeReporter.TimerType.ModuleDefinitionTotal);
			module.Define ();
			tr.Stop (TimeReporter.TimerType.ModuleDefinitionTotal);

			if (Report.Errors > 0)
				return false;

			if (settings.DocumentationFile != null) {
				var doc = new DocumentationBuilder (module);
				doc.OutputDocComment (output_file, settings.DocumentationFile);
			}

			assembly.Resolve ();
			
			if (Report.Errors > 0)
				return false;


			tr.Start (TimeReporter.TimerType.EmitTotal);
			assembly.Emit ();
			tr.Stop (TimeReporter.TimerType.EmitTotal);

			if (Report.Errors > 0){
				return false;
			}

			tr.Start (TimeReporter.TimerType.CloseTypes);
			module.CloseContainer ();
			tr.Stop (TimeReporter.TimerType.CloseTypes);

			tr.Start (TimeReporter.TimerType.Resouces);
			if (!settings.WriteMetadataOnly)
				assembly.EmbedResources ();
			tr.Stop (TimeReporter.TimerType.Resouces);

			if (Report.Errors > 0)
				return false;

			assembly.Save ();

#if STATIC
			references_loader.Dispose ();
#endif
			tr.StopTotal ();
			tr.ShowStats ();

			return Report.Errors == 0;
		}
開發者ID:,項目名稱:,代碼行數:101,代碼來源:

示例8: GenerateDocComment

		internal override void GenerateDocComment (DocumentationBuilder builder)
		{
			foreach (var tc in containers)
				tc.GenerateDocComment (builder);
		}
開發者ID:nobled,項目名稱:mono,代碼行數:5,代碼來源:module.cs

示例9: GenerateDocComment

		//
		// Generates xml doc comments (if any), and if required,
		// handle warning report.
		//
		internal virtual void GenerateDocComment (DocumentationBuilder builder)
		{
			if (DocComment == null) {
				if (IsExposedFromAssembly ()) {
					var td = this as TypeDefinition;
					if (td != null && td.PartialContainer != null) {
						//
						// This partial part does not have comment but some other part can have
						//
						foreach (var tc in Parent.Containers) {
							if (tc.PartialContainer == td.PartialContainer && tc.DocComment != null)
								return;
						}
					}

					Constructor c = this as Constructor;
					if (c == null || !c.IsDefault ())
						Report.Warning (1591, 4, Location,
							"Missing XML comment for publicly visible type or member `{0}'", GetSignatureForError ());
				}

				return;
			}

			try {
				builder.GenerateDocumentationForMember (this);
			} catch (Exception e) {
				throw new InternalErrorException (this, e);
			}
		}
開發者ID:tyler123durden,項目名稱:mono,代碼行數:34,代碼來源:decl.cs


注:本文中的Mono.CSharp.DocumentationBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。