From 0ad244d04bb1de179974738d4ec2d3cfcb9e516e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=8D=B4?= <479813005@qq.com> Date: Mon, 4 Sep 2023 15:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Megumin/Class/ValueTaskSource.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Megumin.Explosion/Megumin/Class/ValueTaskSource.cs b/Megumin.Explosion/Megumin/Class/ValueTaskSource.cs index c7c52ad..1c0b4cd 100644 --- a/Megumin.Explosion/Megumin/Class/ValueTaskSource.cs +++ b/Megumin.Explosion/Megumin/Class/ValueTaskSource.cs @@ -487,6 +487,28 @@ void Test() // { // throw new NotImplementedException(); // } + +// public ValueTask GetOrCreate(string key) +// { +// //If you want to implement this function + +// IValueTaskSource source = MyValueTaskSource.Default; + +// short token = 0; +// if (key == "Tom") +// { +// token = 1; +// } +// else if (key == "Jerry") +// { +// token = 2; +// } + +// return new ValueTask(source, token); + + +// //return new ValueTask(source, key); +// } //} @@ -515,3 +537,4 @@ void Test() +