protected override void AddReturn(System.IO.TextWriter writer) { var returnType = this._propertyInfo.PropertyType; if (returnType == null) { return; } writer.WriteLine("<div class=\"sectionbody\">"); writer.WriteLine("<div id=\"returnType\">"); writer.WriteLine("<strong class=\"subHeading\">Property Value</strong><br />"); writer.WriteLine("</div>"); var sb = new StringBuilder("Type: <span>"); var nsFolder = GenerationManifest.OutputSubFolderFromNamespace(_propertyInfo.DeclaringType.Namespace); sb.Append(EmitTypeLinkMarkup(returnType, this._version)); if (returnType.IsGenericType) { sb.Append(ProcessGenericParameterTypes(returnType.GenericTypeArguments(), _version)); } writer.WriteLine("{0}</span>", sb); writer.WriteLine("</div>"); }
public MethodWriter(GenerationManifest artifacts, FrameworkVersion version, MethodInfoWrapper methodInfo) : base(artifacts, version, methodInfo) { this._methodInfo = methodInfo; this._isFakeAsync = this._methodInfo.FullName == "Amazon.Lambda.Model.InvokeAsyncResponse InvokeAsync(Amazon.Lambda.Model.InvokeAsyncRequest)"; if (_isFakeAsync || !this._methodInfo.Name.EndsWith("Async", StringComparison.Ordinal)) { //This is not an Async method. Lookup if an Async version exists for .NET Core. this._hasAsyncVersion = NDocUtilities.FindDocumentationAsync(Artifacts.NDocForPlatform("netcoreapp3.1"), methodInfo) != null; } }
public MethodWriter(GenerationManifest artifacts, FrameworkVersion version, MethodInfoWrapper methodInfo) : base(artifacts, version, methodInfo) { this._methodInfo = methodInfo; // true when this is an Async method and the unity version is present this._unityVersionOfAsyncExists = NDocUtilities.FindDocumentationUnityAsync(Artifacts.NDocForPlatform("unity"), methodInfo) != null; // refer to asynchronous versions if the synchronous version doesn't exist but the async version does this._referAsyncAlternativeUnity = (NDocUtilities.FindDocumentationUnityAsyncAlternative(Artifacts.NDocForPlatform("unity"), methodInfo) != null) && (Artifacts.NDocForPlatform("unity") != null) && (NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("unity"), methodInfo) == null); this._referAsyncAlternativePCL = (NDocUtilities.FindDocumentationPCLAsyncAlternative(Artifacts.NDocForPlatform("pcl"), methodInfo) != null) && (Artifacts.NDocForPlatform("pcl") != null) && (NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), methodInfo) == null); }
void WriteNamespaceToc(JsonWriter writer, string ns) { var assemblyWrapper = _generatedNamespaces[ns]; var tocId = ns.Replace(".", "_"); var nsFilePath = Path.Combine("./" + Options.ContentSubFolderName, GenerationManifest.OutputSubFolderFromNamespace(ns), FilenameGenerator.GenerateNamespaceFilename(ns)).Replace('\\', '/'); writer.WritePropertyName(ns); writer.WriteObjectStart(); writer.WritePropertyName("id"); writer.Write(tocId); writer.WritePropertyName("href"); writer.Write(nsFilePath); writer.WritePropertyName("nodes"); writer.WriteObjectStart(); foreach (var type in assemblyWrapper.GetTypesForNamespace(ns).OrderBy(x => x.Name)) { var filePath = Path.Combine("./" + Options.ContentSubFolderName, GenerationManifest.OutputSubFolderFromNamespace(type.Namespace), FilenameGenerator.GenerateFilename(type)).Replace('\\', '/'); writer.WritePropertyName(type.GetDisplayName(false)); writer.WriteObjectStart(); writer.WritePropertyName("id"); writer.Write(type.GetDisplayName(true).Replace(".", "_")); writer.WritePropertyName("href"); writer.Write(filePath); writer.WriteObjectEnd(); } writer.WriteObjectEnd(); writer.WriteObjectEnd(); }
void AddEvent(TextWriter writer, EventInfoWrapper info) { writer.WriteLine("<tr>"); writer.WriteLine("<td>"); writer.WriteLine("<img class=\"event\" src=\"{0}/resources/blank.gif\" title=\"Event\" alt=\"Event\"/>", RootRelativePath); if (info.IsStatic) { writer.WriteLine("<img class=\"static\" src=\"{0}/resources/blank.gif\" title=\"Static Event\" alt=\"Static Event\"/>", RootRelativePath); } writer.WriteLine("</td>"); writer.WriteLine("<td>"); writer.WriteLine("<a href=\"{0}/items/{1}/{2}\">{3}</a>", RootRelativePath, GenerationManifest.OutputSubFolderFromNamespace(info.DeclaringType.Namespace), FilenameGenerator.GenerateFilename(info), info.Name); writer.WriteLine("</td>"); writer.WriteLine("<td>"); string html = string.Empty; var isInherited = !info.DeclaringType.Equals(_versionType); if (isInherited) { html = string.Format("Inherited from {0}.{1}.", info.DeclaringType.Namespace, info.DeclaringType.Name); } else { var docs = NDocUtilities.FindDocumentation(info); html = NDocUtilities.TransformDocumentationToHTML(docs, "summary", Artifacts.AssemblyWrapper, this._version); } writer.WriteLine(html); writer.WriteLine("</td>"); writer.WriteLine("</tr>"); }
void AddMethod(TextWriter writer, MethodInfoWrapper info) { writer.WriteLine("<tr>"); writer.WriteLine("<td>"); writer.WriteLine("<img class=\"publicMethod\" src=\"{0}/resources/blank.gif\" title=\"Public Method\" alt=\"Public Method\"/>", RootRelativePath); if (info.IsStatic) { writer.WriteLine("<img class=\"static\" src=\"{0}/resources/blank.gif\" title=\"Static Method\" alt=\"Static Method\"/>", RootRelativePath); } writer.WriteLine("</td>"); writer.WriteLine("<td>"); writer.WriteLine("<a href=\"{0}/items/{1}/{2}\">{3}({4})</a>", RootRelativePath, GenerationManifest.OutputSubFolderFromNamespace(info.DeclaringType.Namespace), FilenameGenerator.GenerateFilename(info), info.Name, FormatParameters(info.GetParameters())); writer.WriteLine("</td>"); writer.WriteLine("<td>"); string html = string.Empty; if (_versionType.Namespace != info.DeclaringType.Namespace) { html = string.Format("Inherited from {0}.{1}.", info.DeclaringType.Namespace, info.DeclaringType.Name); } else { var docs = NDocUtilities.FindDocumentation(this._currentNDoc, info); html = NDocUtilities.TransformDocumentationToHTML(docs, "summary", Artifacts.AssemblyWrapper, this._version); } writer.WriteLine(html); writer.WriteLine("</td>"); writer.WriteLine("</tr>"); }
public EventWriter(GenerationManifest artifacts, FrameworkVersion version, EventInfoWrapper eventInfo) : base(artifacts, version, eventInfo) { this._eventInfo = eventInfo; }
protected BaseWriter(GenerationManifest artifacts, FrameworkVersion version) : this(artifacts, artifacts.AssemblyWrapper, version) { }
public ConstructorWriter(GenerationManifest artifacts, FrameworkVersion version, ConstructorInfoWrapper constructorInfo) : base(artifacts, version, constructorInfo) { this._constructorInfo = constructorInfo; }
public ClassWriter(GenerationManifest artifacts, FrameworkVersion version, TypeWrapper versionType) : base(artifacts, version) { _versionType = versionType; _version = version; }
protected BaseWriter(GenerationManifest artifacts, AbstractTypeProvider typeProvider, FrameworkVersion version) { Artifacts = artifacts; TypeProvider = typeProvider; _version = version; }
public PropertyWriter(GenerationManifest artifacts, FrameworkVersion version, PropertyInfoWrapper propertyInfo) : base(artifacts, version, propertyInfo) { this._propertyInfo = propertyInfo; }
protected MethodBaseWriter(GenerationManifest artifacts, FrameworkVersion version, MethodBaseWrapper info) : base(artifacts, version, info) { this._info = info; }
protected BaseWriter(GenerationManifest artifacts, FrameworkVersion version) { Artifacts = artifacts; _version = version; _currentNDoc = this.Artifacts.NDocForPlatform(); // yields the default platform ndoc }
protected MemberWriter(GenerationManifest artifacts, FrameworkVersion version, MemberInfoWrapper info) : base(artifacts, version) { this._info = info; }
public FieldWriter(GenerationManifest artifacts, FrameworkVersion version, FieldInfoWrapper FieldInfo) : base(artifacts, version, FieldInfo) { this._fieldInfo = FieldInfo; }
public NamespaceWriter(GenerationManifest artifacts, FrameworkVersion version, string namespaceName) : base(artifacts, version) { this._namespaceName = namespaceName; this._assemblyWrapper = artifacts.AssemblyWrapper; }
public MethodWriter(GenerationManifest artifacts, FrameworkVersion version, MethodInfoWrapper methodInfo) : base(artifacts, version, methodInfo) { this._methodInfo = methodInfo; }
protected BaseWriter(GenerationManifest artifacts, FrameworkVersion version) : this(artifacts, artifacts.ManifestAssemblyContext.SdkAssembly, version) { }
protected override string GenerateFilepath() { return(GenerationManifest.OutputSubFolderFromNamespace(_versionType.Namespace)); }
public NamespaceWriter(GenerationManifest artifacts, FrameworkVersion version, string namespaceName) : base(artifacts, version) { this._namespaceName = namespaceName; this._assemblyWrapper = artifacts.ManifestAssemblyContext.SdkAssembly; }
protected override string GenerateFilepath() { return(GenerationManifest.OutputSubFolderFromNamespace(_fieldInfo.DeclaringType.Namespace)); }