mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Co-authored-by: Paul <ritter.paul1@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
30 lines
1.4 KiB
C#
30 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Reflection;
|
|
|
|
namespace Robust.Shared.Utility
|
|
{
|
|
internal abstract class AbstractFieldInfo
|
|
{
|
|
public abstract string Name { get; }
|
|
internal abstract MemberInfo MemberInfo { get; }
|
|
public abstract Type FieldType { get; }
|
|
public abstract Type? DeclaringType { get; }
|
|
public abstract Module Module { get; }
|
|
|
|
public abstract object? GetValue(object? obj);
|
|
public abstract void SetValue(object? obj, object? value);
|
|
|
|
public abstract T? GetAttribute<T>(bool includeBacking = false) where T : Attribute;
|
|
public abstract IEnumerable<T> GetAttributes<T>(bool includeBacking = false) where T : Attribute;
|
|
public abstract bool HasAttribute<T>(bool includeBacking = false) where T : Attribute;
|
|
public abstract bool TryGetAttribute<T>([NotNullWhen(true)] out T? attribute, bool includeBacking = false) where T : Attribute;
|
|
public abstract bool TryGetAttribute(Type type, [NotNullWhen(true)] out Attribute? attribute, bool includeBacking = false);
|
|
public abstract bool IsBackingField();
|
|
public abstract bool HasBackingField();
|
|
public abstract SpecificFieldInfo? GetBackingField();
|
|
public abstract bool TryGetBackingField([NotNullWhen(true)] out SpecificFieldInfo? field);
|
|
}
|
|
}
|