ApacheTech.Common.Extensions.Harmony
1.2.0
See the version list below for details.
dotnet add package ApacheTech.Common.Extensions.Harmony --version 1.2.0
NuGet\Install-Package ApacheTech.Common.Extensions.Harmony -Version 1.2.0
<PackageReference Include="ApacheTech.Common.Extensions.Harmony" Version="1.2.0" />
paket add ApacheTech.Common.Extensions.Harmony --version 1.2.0
#r "nuget: ApacheTech.Common.Extensions.Harmony, 1.2.0"
// Install ApacheTech.Common.Extensions.Harmony as a Cake Addin #addin nuget:?package=ApacheTech.Common.Extensions.Harmony&version=1.2.0 // Install ApacheTech.Common.Extensions.Harmony as a Cake Tool #tool nuget:?package=ApacheTech.Common.Extensions.Harmony&version=1.2.0
Harmony Reflection Extensions
This package of extension methods gives an elegant way to use reflection on all kinds of objects within C#. Below, is a list of methods that are added at an object level, allowing simple and easy access to internal
and private
members.
All that is required is that Lib.Harmony
should be included within your project. This package does not supply Harmony. Once installed, add the following using statement to your class file.
using ApacheTech.Common.Extensions.Harmony;
Fields
Method | Description |
---|---|
GetField<T> | Gets a field within the calling instanced object. This can be an internal or private field within another assembly. |
GetFields<T> | Gets an array of fields within the calling instanced object, of a specified Type. These can be an internal or private fields within another assembly. |
SetField | Sets a field within the calling instanced object. This can be an internal or private field within another assembly. |
Properties
Method | Description |
---|---|
GetProperty<T> | Gets a property within the calling instanced object. This can be an internal or private property within another assembly. |
SetProperty | Sets a property within the calling instanced object. This can be an internal or private property within another assembly. |
Methods
Method | Description |
---|---|
CallMethod | (2 methods) Calls a method within an instance of an object, via reflection. This can be an internal or private method within another assembly. |
CallMethod<T> | Calls a method within an instance of an object, via reflection. This can be an internal or private method within another assembly. |
GetMethod | Gets the <see cref="MethodInfo"/> for a method within an instance of a class, via reflection. This can be an internal or private method within another assembly. |
Types
Method | Description |
---|---|
GetClassType | Gets the type of the class within an assembly, via reflection. |
CreateInstance | Creates the instance of a specified Type, using Harmony AccessTools. Be aware that this will ignore all Service Providers, and attempt to directly instantiate a class. |
Objects
Method | Description |
---|---|
DeepClone<T> | Makes a deep copy of any object. |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
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. |
-
.NETStandard 2.0
- ApacheTech.Common.Extensions (>= 1.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ApacheTech.Common.Extensions.Harmony:
Package | Downloads |
---|---|
ApacheTech.VintageMods.FluentChatCommands
Provides a framework for creating client-side, and server-side chat commands, using a Fluent Builder pattern. |
|
VintageStory.Gantry
Gantry MDK is a Mod Developent Kit, used to create third-party plugins for the game Vintage Story, by Anego Studios. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release