Skip to content

Commit

Permalink
增加笔记
Browse files Browse the repository at this point in the history
  • Loading branch information
KumoKyaku committed Sep 4, 2023
1 parent 45086ba commit 0ad244d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Megumin.Explosion/Megumin/Class/ValueTaskSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,28 @@ void Test()
// {
// throw new NotImplementedException();
// }

// public ValueTask<int> GetOrCreate(string key)
// {
// //If you want to implement this function

// IValueTaskSource<int> source = MyValueTaskSource.Default;

// short token = 0;
// if (key == "Tom")
// {
// token = 1;
// }
// else if (key == "Jerry")
// {
// token = 2;
// }

// return new ValueTask<int>(source, token);


// //return new ValueTask<int, string>(source, key);
// }
//}


Expand Down Expand Up @@ -515,3 +537,4 @@ void Test()




0 comments on commit 0ad244d

Please sign in to comment.