mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-09 09:24:35 +01:00
* wip * hacky fix for overlapping event text in profiler * move IsResumeGameAfterPluginLoad logic to PluginManager * fix some warnings * handle exceptions properly * remove ability to cancel, rename button to "hide" instead * undo Dalamud.Service refactor for now * warnings * add explainer, show which plugins are still loading * add some text if loading takes more than 3 minutes * undo wrong CS merge
41 lines
1,019 B
C#
Executable file
41 lines
1,019 B
C#
Executable file
using System.Reflection;
|
|
|
|
namespace Dalamud.Utility.Signatures.Wrappers;
|
|
|
|
/// <summary>
|
|
/// Class providing information about a field.
|
|
/// </summary>
|
|
internal sealed class FieldInfoWrapper : IFieldOrPropertyInfo
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="FieldInfoWrapper"/> class.
|
|
/// </summary>
|
|
/// <param name="info">FieldInfo to populate from.</param>
|
|
public FieldInfoWrapper(FieldInfo info)
|
|
{
|
|
this.Info = info;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string Name => this.Info.Name;
|
|
|
|
/// <inheritdoc/>
|
|
public Type ActualType => this.Info.FieldType;
|
|
|
|
/// <inheritdoc/>
|
|
public bool IsNullable => NullabilityUtil.IsNullable(this.Info);
|
|
|
|
private FieldInfo Info { get; }
|
|
|
|
/// <inheritdoc/>
|
|
public void SetValue(object? self, object? value)
|
|
{
|
|
this.Info.SetValue(self, value);
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public T? GetCustomAttribute<T>() where T : Attribute
|
|
{
|
|
return this.Info.GetCustomAttribute<T>();
|
|
}
|
|
}
|