Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuangmin-ms <huangmin@microsoft.com>2022-11-04 06:32:38 +0300
committerhuangmin-ms <huangmin@microsoft.com>2022-11-04 06:32:38 +0300
commitb005e9400f1cf03bb9decad020872f78ed5dd875 (patch)
treecc68d30207fd0cb2d66640b3eb3f574f856979fd
parentab8ec7aee5c082a371068e6c4e804cda95cf4d2b (diff)
Add a sample interface for static virtual
-rw-r--r--mdoc/mdoc.Test/SampleClasses/StaticVirtualMemberInInterface.cs19
-rw-r--r--mdoc/mdoc.Test/mdoc.Test.csproj3
2 files changed, 21 insertions, 1 deletions
diff --git a/mdoc/mdoc.Test/SampleClasses/StaticVirtualMemberInInterface.cs b/mdoc/mdoc.Test/SampleClasses/StaticVirtualMemberInInterface.cs
new file mode 100644
index 00000000..f715ef5f
--- /dev/null
+++ b/mdoc/mdoc.Test/SampleClasses/StaticVirtualMemberInInterface.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace mdoc.Test.SampleClasses
+{
+ public interface StaticVirtualMemberInInterface<TSelf, TOther, TResult> where TSelf : StaticVirtualMemberInInterface<TSelf, TOther, TResult>?
+ {
+#if NETCOREAPP
+ static virtual int StaticVirtualMethod(int left, int right)
+ {
+ return Math.Max(left, right);
+ }
+#pragma warning disable CA2252
+ static abstract TResult operator +(TSelf left, TOther right);
+#pragma warning restore CA2252
+
+ static virtual TResult operator checked +(TSelf left, TOther right) => left + right;
+#endif
+ }
+}
diff --git a/mdoc/mdoc.Test/mdoc.Test.csproj b/mdoc/mdoc.Test/mdoc.Test.csproj
index 1a4d2bf7..f9967e97 100644
--- a/mdoc/mdoc.Test/mdoc.Test.csproj
+++ b/mdoc/mdoc.Test/mdoc.Test.csproj
@@ -15,7 +15,8 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' != 'net471' ">
- <OutputPath>bin\$(Configuration)-$(TargetFramework)</OutputPath>
+ <OutputPath>bin\$(Configuration)-$(TargetFramework)</OutputPath>
+ <EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net471' ">