protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsCore20 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netstandard2.0"), wrapper); var docsNetCoreApp31 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netcoreapp3.1"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsCore20 == null && docsNetCoreApp31 == null; // .NET Core App var netCoreAppVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docsNetCoreApp31 != null)) { netCoreAppVersions.Add("3.1"); } if (netCoreAppVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Core App: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netCoreAppVersions)); } // .NET Standard var netstandardVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docsCore20 != null)) { netstandardVersions.Add("2.0"); } if (netstandardVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Standard: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netstandardVersions)); } // .NET Framework var netframeworkVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docs45 != null)) { netframeworkVersions.Add("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { netframeworkVersions.Add("4.0"); netframeworkVersions.Add("3.5"); } if (netframeworkVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netframeworkVersions)); } AddSectionClosing(writer); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsCore = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netstandard1.3"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); var docsUnity = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("unity"), wrapper); // If there is no documentation then assume it is available for all platforms, excluding Unity. var boolNoDocs = docs35 == null && docs45 == null && docsCore == null && docsPCL == null && docsUnity == null; // .NET core Framework if (boolNoDocs || (wrapper != null && docsCore != null)) { writer.WriteLine("<p><strong>.NET Core: </strong><br/>Supported in: 1.3<br/>"); } // .NET Framework StringBuilder sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) { sb.Append("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) { sb.Append(", "); } sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null || _referAsyncAlternativePCL) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } if (docsUnity != null || _unityVersionOfAsyncExists || _referAsyncAlternativeUnity) { writer.WriteLine("<p><strong>Unity: </strong><br/>"); writer.WriteLine("Supported Versions: 4.6 and above<br/>"); writer.WriteLine("Supported Platforms: Android, iOS, Standalone<br/>"); } AddSectionClosing(writer); }
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); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsPCL == null; var sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) { sb.Append("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) { sb.Append(", "); } sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } AddSectionClosing(writer); }