Explorar o código

misc: chore: [ci skip] AlwaysReturn factory function to go with the AlwaysResets singleton one.

Evan Husted hai 1 ano
pai
achega
0bf7c5dfa2
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/Ryujinx/Utilities/PlayReportAnalyzer.cs

+ 7 - 0
src/Ryujinx/Utilities/PlayReportAnalyzer.cs

@@ -176,6 +176,13 @@ namespace Ryujinx.Ava.Utilities
             /// A delegate singleton you can use to always return <see cref="ForceReset"/> in a <see cref="PlayReportValueFormatter"/>.
             /// </summary>
             public static readonly PlayReportValueFormatter AlwaysResets = _ => ForceReset;
+
+            /// <summary>
+            /// A delegate factory you can use to always return the specified
+            /// <paramref name="formattedValue"/> in a <see cref="PlayReportValueFormatter"/>.
+            /// <param name="formattedValue">The string to always return for this delegate instance.</param>
+            /// </summary>
+            public static PlayReportValueFormatter AlwaysReturns(string formattedValue) => _ => formattedValue;
         }
     }