Skip to content

Commit

Permalink
__resultRef implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kohanis committed Feb 22, 2024
1 parent 2a09e7a commit 60c8dc5
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Harmony/Extras/RefResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace HarmonyLib;

public delegate ref T RefResult<T>();

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseThin) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Build Binaries (ubuntu, ubuntu-latest, ReleaseFat) / Upload Test Build Output Cache

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / Mono ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / Mono ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseThin) / .NET ubuntu-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (ubuntu, ubuntu-latest, x64, ReleaseFat) / .NET ubuntu-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseThin) / Mono macos-arm64-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / MacOS Mono Rosetta 2 (macos-arm64, macos-14, x64, ReleaseFat) / Mono macos-arm64-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseFat) / .NET macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseFat) / .NET FX x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS .NET x64 (macos, macos-13, x64, ReleaseThin) / .NET macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseThin) / .NET FX x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x64, ReleaseFat) / .NET FX x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseThin) / Mono macos-x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Framework x86/x64 (x86, ReleaseThin) / .NET FX x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Ubuntu/MacOS Mono x64 (macos, macos-13, x64, ReleaseFat) / Mono macos-x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseFat) / Mono x86 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x86, ReleaseThin) / Mono x86 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseFat) / Mono x64 ReleaseFat

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'

Check warning on line 3 in Harmony/Extras/RefResult.cs

View workflow job for this annotation

GitHub Actions / Windows Mono x86/x64 (x64, ReleaseThin) / Mono x64 ReleaseThin

Missing XML comment for publicly visible type or member 'RefResult<T>'
91 changes: 84 additions & 7 deletions Harmony/Internal/MethodPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal class MethodPatcher
const string ORIGINAL_METHOD_PARAM = "__originalMethod";
const string ARGS_ARRAY_VAR = "__args";
const string RESULT_VAR = "__result";
const string RESULT_REF_VAR = "__resultRef";
const string STATE_VAR = "__state";
const string EXCEPTION_VAR = "__exception";
const string RUN_ORIGINAL_VAR = "__runOriginal";
Expand Down Expand Up @@ -76,6 +77,19 @@ internal MethodInfo CreateReplacement(out Dictionary<int, CodeInstruction> final
privateVars[RESULT_VAR] = resultVariable;
}

if (fixes.Any(fix => fix.GetParameters().Any(p => p.Name == RESULT_REF_VAR)))
{
if(returnType.IsByRef)
{
var resultRefVariable = il.DeclareLocal(
typeof(RefResult<>).MakeGenericType(returnType.GetElementType())
);
emitter.Emit(OpCodes.Ldnull);
emitter.Emit(OpCodes.Stloc, resultRefVariable);
privateVars[RESULT_REF_VAR] = resultRefVariable;
}
}

LocalBuilder argsArrayVariable = null;
if (fixes.Any(fix => fix.GetParameters().Any(p => p.Name == ARGS_ARRAY_VAR)))
{
Expand Down Expand Up @@ -432,10 +446,11 @@ bool EmitOriginalBaseMethod()
return true;
}

void EmitCallParameter(MethodInfo patch, Dictionary<string, LocalBuilder> variables, LocalBuilder runOriginalVariable, bool allowFirsParamPassthrough, out LocalBuilder tmpInstanceBoxingVar, out LocalBuilder tmpObjectVar, List<KeyValuePair<LocalBuilder, Type>> tmpBoxVars)
void EmitCallParameter(MethodInfo patch, Dictionary<string, LocalBuilder> variables, LocalBuilder runOriginalVariable, bool allowFirsParamPassthrough, out LocalBuilder tmpInstanceBoxingVar, out LocalBuilder tmpObjectVar, out bool refResultUsed, List<KeyValuePair<LocalBuilder, Type>> tmpBoxVars)
{
tmpInstanceBoxingVar = null;
tmpObjectVar = null;
refResultUsed = false;

var isInstance = original.IsStatic is false;
var originalParameters = original.GetParameters();
Expand Down Expand Up @@ -474,10 +489,10 @@ void EmitCallParameter(MethodInfo patch, Dictionary<string, LocalBuilder> variab
else
{
var paramType = patchParam.ParameterType;

var parameterIsRef = paramType.IsByRef;
var parameterIsObject = paramType == typeof(object) || paramType == typeof(object).MakeByRefType();

if (AccessTools.IsStruct(originalType))
{
if (parameterIsObject)
Expand Down Expand Up @@ -571,7 +586,6 @@ void EmitCallParameter(MethodInfo patch, Dictionary<string, LocalBuilder> variab
// treat __result var special
if (patchParam.Name == RESULT_VAR)
{
var returnType = AccessTools.GetReturnedType(original);
if (returnType == typeof(void))
throw new Exception($"Cannot get result from void method {original.FullDescription()}");
var resultType = patchParam.ParameterType;
Expand All @@ -597,6 +611,30 @@ void EmitCallParameter(MethodInfo patch, Dictionary<string, LocalBuilder> variab
continue;
}

// treat __resultRef delegate special
if (patchParam.Name == RESULT_REF_VAR)
{
if (!patchParam.IsOut)
throw new Exception($"{RESULT_REF_VAR} should be out parameter");

if (!returnType.IsByRef)
throw new Exception(
$"Cannot use {RESULT_REF_VAR} with non-ref return type {returnType.FullName} of method {original.FullDescription()}");

var resultType = patchParam.ParameterType;
var expectedType = typeof(RefResult<>).MakeGenericType(returnType.GetElementType());
var expectedTypeRef = expectedType.MakeByRefType();
if (resultType != expectedTypeRef)
throw new Exception(
$"Wrong type of {RESULT_REF_VAR} for method {original.FullDescription()}. Expected {expectedTypeRef.FullName}, got {resultType.FullName}");

emitter.Emit(OpCodes.Ldloca, variables[RESULT_REF_VAR]);

refResultUsed = true;
continue;
}


// any other declared variables
if (variables.TryGetValue(patchParam.Name, out var localBuilder))
{
Expand Down Expand Up @@ -763,7 +801,7 @@ void AddPrefixes(Dictionary<string, LocalBuilder> variables, LocalBuilder runOri
}
var tmpBoxVars = new List<KeyValuePair<LocalBuilder, Type>>();
EmitCallParameter(fix, variables, runOriginalVariable, false, out var tmpInstanceBoxingVar, out var tmpObjectVar, tmpBoxVars);
EmitCallParameter(fix, variables, runOriginalVariable, false, out var tmpInstanceBoxingVar, out var tmpObjectVar, out var refResultUsed, tmpBoxVars);
emitter.Emit(OpCodes.Call, fix);
if (fix.GetParameters().Any(p => p.Name == ARGS_ARRAY_VAR))
RestoreArgumentArray(variables);
Expand All @@ -780,6 +818,19 @@ void AddPrefixes(Dictionary<string, LocalBuilder> variables, LocalBuilder runOri
emitter.Emit(OpCodes.Unbox_Any, AccessTools.GetReturnedType(original));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
}
if (refResultUsed)
{
var label = il.DefineLabel();
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Brfalse_S, label);
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Callvirt, AccessTools.Method(variables[RESULT_REF_VAR].LocalType, "Invoke"));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
emitter.Emit(OpCodes.Ldnull);
emitter.Emit(OpCodes.Stloc, variables[RESULT_REF_VAR]);
emitter.MarkLabel(label);
emitter.Emit(OpCodes.Nop);
}
tmpBoxVars.Do(tmpBoxVar =>
{
emitter.Emit(original.IsStatic ? OpCodes.Ldarg_0 : OpCodes.Ldarg_1);
Expand Down Expand Up @@ -815,7 +866,7 @@ bool AddPostfixes(Dictionary<string, LocalBuilder> variables, LocalBuilder runOr
// throw new Exception("Methods without body cannot have postfixes. Use a transpiler instead.");
var tmpBoxVars = new List<KeyValuePair<LocalBuilder, Type>>();
EmitCallParameter(fix, variables, runOriginalVariable, true, out var tmpInstanceBoxingVar, out var tmpObjectVar, tmpBoxVars);
EmitCallParameter(fix, variables, runOriginalVariable, true, out var tmpInstanceBoxingVar, out var tmpObjectVar, out var refResultUsed, tmpBoxVars);
emitter.Emit(OpCodes.Call, fix);
if (fix.GetParameters().Any(p => p.Name == ARGS_ARRAY_VAR))
RestoreArgumentArray(variables);
Expand All @@ -832,6 +883,19 @@ bool AddPostfixes(Dictionary<string, LocalBuilder> variables, LocalBuilder runOr
emitter.Emit(OpCodes.Unbox_Any, AccessTools.GetReturnedType(original));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
}
if (refResultUsed)
{
var label = il.DefineLabel();
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Brfalse_S, label);
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Callvirt, AccessTools.Method(variables[RESULT_REF_VAR].LocalType, "Invoke"));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
emitter.Emit(OpCodes.Ldnull);
emitter.Emit(OpCodes.Stloc, variables[RESULT_REF_VAR]);
emitter.MarkLabel(label);
emitter.Emit(OpCodes.Nop);
}
tmpBoxVars.Do(tmpBoxVar =>
{
emitter.Emit(original.IsStatic ? OpCodes.Ldarg_0 : OpCodes.Ldarg_1);
Expand Down Expand Up @@ -871,7 +935,7 @@ bool AddFinalizers(Dictionary<string, LocalBuilder> variables, LocalBuilder runO
emitter.MarkBlockBefore(new ExceptionBlock(ExceptionBlockType.BeginExceptionBlock), out var label);
var tmpBoxVars = new List<KeyValuePair<LocalBuilder, Type>>();
EmitCallParameter(fix, variables, runOriginalVariable, false, out var tmpInstanceBoxingVar, out var tmpObjectVar, tmpBoxVars);
EmitCallParameter(fix, variables, runOriginalVariable, false, out var tmpInstanceBoxingVar, out var tmpObjectVar, out var refResultUsed, tmpBoxVars);
emitter.Emit(OpCodes.Call, fix);
if (fix.GetParameters().Any(p => p.Name == ARGS_ARRAY_VAR))
RestoreArgumentArray(variables);
Expand All @@ -888,6 +952,19 @@ bool AddFinalizers(Dictionary<string, LocalBuilder> variables, LocalBuilder runO
emitter.Emit(OpCodes.Unbox_Any, AccessTools.GetReturnedType(original));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
}
if (refResultUsed)
{
var label = il.DefineLabel();
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Brfalse_S, label);
emitter.Emit(OpCodes.Ldloc, variables[RESULT_REF_VAR]);
emitter.Emit(OpCodes.Callvirt, AccessTools.Method(variables[RESULT_REF_VAR].LocalType, "Invoke"));
emitter.Emit(OpCodes.Stloc, variables[RESULT_VAR]);
emitter.Emit(OpCodes.Ldnull);
emitter.Emit(OpCodes.Stloc, variables[RESULT_REF_VAR]);
emitter.MarkLabel(label);
emitter.Emit(OpCodes.Nop);
}
tmpBoxVars.Do(tmpBoxVar =>
{
emitter.Emit(original.IsStatic ? OpCodes.Ldarg_0 : OpCodes.Ldarg_1);
Expand Down
47 changes: 47 additions & 0 deletions HarmonyTests/Patching/Assets/Specials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,53 @@ public static void ResetTest()

// -----------------------------------------------------

public class ResultRefStruct
{
public static int[] Ints = [0, 0, 0, 0, 0, 0, 0];

[MethodImpl(MethodImplOptions.NoInlining)]
public ref int Method1() => ref Ints[0];

[MethodImpl(MethodImplOptions.NoInlining)]
public ref int Method2() => ref Ints[2];

[MethodImpl(MethodImplOptions.NoInlining)]
public ref int Method3() => ref Ints[4];

[MethodImpl(MethodImplOptions.NoInlining)]
public ref int Method4() => throw new Exception();
}

[HarmonyPatch(typeof(ResultRefStruct))]
public class ResultRefStruct_Patch
{
[HarmonyPatch(nameof(ResultRefStruct.Method1))]
[HarmonyPrefix]
public static bool Method1Prefix(out RefResult<int> __resultRef)
{
__resultRef = () => ref ResultRefStruct.Ints[1];
return false;
}

[HarmonyPatch(nameof(ResultRefStruct.Method2))]
[HarmonyPostfix]
public static void Method2Postfix(out RefResult<int> __resultRef) => __resultRef = () => ref ResultRefStruct.Ints[3];

[HarmonyPatch(nameof(ResultRefStruct.Method3))]
[HarmonyPostfix]
public static void Method3PostfixWithNull(out RefResult<int> __resultRef) => __resultRef = null;

[HarmonyPatch(nameof(ResultRefStruct.Method4))]
[HarmonyFinalizer]
public static Exception Method4Finalizer(out RefResult<int> __resultRef)
{
__resultRef = () => ref ResultRefStruct.Ints[6];
return null;
}
}

// -----------------------------------------------------

public class DeadEndCode
{
[MethodImpl(MethodImplOptions.NoInlining)]
Expand Down
36 changes: 32 additions & 4 deletions HarmonyTests/Patching/Specials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,34 @@ public void Test_HttpWebRequestGetResponse()
Assert.True(HttpWebRequestPatches.postfixCalled, "Postfix not called");
}

[Test]
public void Test_PatchResultRef()
{
var test = new ResultRefStruct();

var instance = new Harmony("result-ref-test");
Assert.NotNull(instance);
var processor = instance.CreateClassProcessor(typeof(ResultRefStruct_Patch));
Assert.NotNull(processor, "processor");

test.Method1() = 1;
test.Method2() = 2;
test.Method3() = 3;
Assert.Throws<Exception>(() => test.Method4(), "Method4 does not throw");

Assert.AreEqual(new[] { 1, 0, 2, 0, 3, 0, 0 }, ResultRefStruct.Ints);

var replacements = processor.Patch();
Assert.NotNull(replacements, "replacements");

test.Method1() = -1;
test.Method2() = -2;
test.Method3() = -3;
test.Method4() = -4;

Assert.AreEqual(new[] { 1, -1, 2, -2, -3, 0, -4 }, ResultRefStruct.Ints);
}

[Test]
public void Test_Patch_ConcreteClass()
{
Expand Down Expand Up @@ -327,7 +355,7 @@ public void Test_PatchExternalMethod()
Assert.NotNull(patcher, "Patch processor");
_ = patcher.Patch();
}

[Test]
public void Test_PatchEventHandler()
{
Expand All @@ -348,7 +376,7 @@ public void Test_PatchEventHandler()
new EventHandlerTestClass().Run();
Console.WriteLine($"### EventHandlerTestClass AFTER");
}

[Test]
public void Test_PatchMarshalledClass()
{
Expand All @@ -369,7 +397,7 @@ public void Test_PatchMarshalledClass()
new MarshalledTestClass().Run();
Console.WriteLine($"### MarshalledTestClass AFTER");
}

[Test]
public void Test_MarshalledWithEventHandler1()
{
Expand All @@ -390,7 +418,7 @@ public void Test_MarshalledWithEventHandler1()
new MarshalledWithEventHandlerTest1Class().Run();
Console.WriteLine($"### MarshalledWithEventHandlerTest1 AFTER");
}

[Test]
public void Test_MarshalledWithEventHandler2()
{
Expand Down

0 comments on commit 60c8dc5

Please sign in to comment.