DanielWillett.ReflectionTools
2.0.3
See the version list below for details.
dotnet add package DanielWillett.ReflectionTools --version 2.0.3
NuGet\Install-Package DanielWillett.ReflectionTools -Version 2.0.3
<PackageReference Include="DanielWillett.ReflectionTools" Version="2.0.3" />
paket add DanielWillett.ReflectionTools --version 2.0.3
#r "nuget: DanielWillett.ReflectionTools, 2.0.3"
// Install DanielWillett.ReflectionTools as a Cake Addin #addin nuget:?package=DanielWillett.ReflectionTools&version=2.0.3 // Install DanielWillett.ReflectionTools as a Cake Tool #tool nuget:?package=DanielWillett.ReflectionTools&version=2.0.3
Shared library for generic reflection tools for CLR implementations. Tested on .NET Framework and Mono.
Requires HarmonyLib 2.2.2+
.
NuGet Package: DanielWillett.ReflectionTools
Accessor
IReflectionToolsLogger
+ReflectionToolsLoggerProxy
for Microsoft'sILogger
support.IsMono
property- Generating static or instance setters and getters for fields and properties.
- Generating static or instance callers for private methods.
- Extensions:
IsExtern
IsIgnored
(using a new IgnoredAttribute)GetPriority
(using a new PriorityAttribute)
GetMethod
method for easily converting a static method to a MethodInfo.ForEachBaseType
for iterating through each type in a type's hierarchy.GetTypesSafe
-Assembly.GetTypes
but it won't throw an exception and will sort by PriorityAttribute.GetImplementedMethod
for getting the implementation of an interface method (even explicitly implemented).GetDelegateSignature
and similar to get parameters, return type, andInvoke
method of a delegate type.CouldBeAssignedTo
for checking if it's possible for a variable of one type to have a value of another type.- Safe, generic methods for getting and checking attribtues.
EmitUtility
Various tools for Harmony patching.
- Generic
Throw
method for Harmony transpilers with optional message. - Methods to use with for loop +
List
Harmony transpiling.MatchPattern
FollowPattern
RemovePattern
ReturnIfFalse
ContinueUntil
ContinueWhile
LabelNext
LabelNextOrReturn
GetNextBranchTarget
FindLabelDestinationIndex
GetLabelId
EmitArgument
GetLocalIndex
LoadConstantI4
GetParameter
EmitParameter
GetLocal
- Methods for
CodeInstruction
manipulationCopyWithoutSpecial
TransferStartingInstructionNeeds
TransferEndingInstructionNeeds
MoveBlocksAndLabels
IsBeginBlockType
IsEndBlockType
- Extensions for
OpCode
matchingIsOfType
IsStLoc
IsLdLoc
IsStArg
IsLdArg
IsBr
IsBrAny
IsLdc
IsConv
- Extensions for emitting
call
vscallvirt
codes.GetCall
GetCallRuntime
Other
- Extensions for Stopwatch
GetElapsedMilliseconds
(returns a double instead of a long like usual)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.0
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
.NETFramework 4.5
- Lib.Harmony (>= 2.2.2)
-
.NETFramework 4.6.1
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
.NETFramework 4.7.1
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
.NETFramework 4.8.1
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
- System.Reflection.Emit (>= 4.6.0)
- System.Reflection.Emit.ILGeneration (>= 4.6.0)
- System.Reflection.Emit.Lightweight (>= 4.6.0)
-
.NETStandard 2.1
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
net5.0
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
net6.0
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
-
net7.0
- Lib.Harmony (>= 2.2.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on DanielWillett.ReflectionTools:
Package | Downloads |
---|---|
DanielWillett.UnturnedUITools
Tools for working with vanilla (Glazier, Sleek, etc.) UIs in Unturned, including an extension system. |
|
DevkitServer.Client
Module for Unturned that enables multi-user map editing. |
|
DevkitServer.Server
Module for Unturned that enables multi-user map editing. |
|
Uncreated.UI
Object-oriented wrapper for Unturned's effect-based server-side UI system. |
|
Breakdown.Tools
Package containing several tools for plugin and module development. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
4.0.0 | 324 | 9/8/2024 | |
3.2.1 | 160 | 6/9/2024 | |
3.2.0 | 162 | 5/26/2024 | |
3.1.0 | 140 | 5/2/2024 | |
3.0.0 | 561 | 5/1/2024 | |
3.0.0-prerelease2 | 177 | 4/27/2024 | |
2.0.3 | 681 | 12/11/2023 | |
2.0.2 | 176 | 11/21/2023 | |
2.0.1 | 508 | 11/18/2023 | |
2.0.0 | 179 | 11/18/2023 | |
1.1.0 | 154 | 11/13/2023 | |
1.0.4 | 157 | 11/9/2023 | |
1.0.3 | 158 | 11/8/2023 | |
1.0.2 | 148 | 10/27/2023 | |
1.0.1 | 159 | 10/21/2023 | |
1.0.0 | 157 | 10/21/2023 |
Added check for default interface implementations in Accessor.GetImplementedMethod.