Show / Hide Table of Contents

# Class Config.PreferAttribute

Specifies that a particular parameter is preferred to be a specific type of IConfigProvider. If it is not available, also specifies backups. If none are available, the default is used.

##### Inheritance

Object
Attribute
Config.PreferAttribute

##### Implements

_Attribute

##### Inherited Members

Attribute.GetCustomAttributes(MemberInfo, Type)
Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
Attribute.GetCustomAttributes(MemberInfo)
Attribute.GetCustomAttributes(MemberInfo, Boolean)
Attribute.IsDefined(MemberInfo, Type)
Attribute.IsDefined(MemberInfo, Type, Boolean)
Attribute.GetCustomAttribute(MemberInfo, Type)
Attribute.GetCustomAttribute(MemberInfo, Type, Boolean)
Attribute.GetCustomAttributes(ParameterInfo)
Attribute.GetCustomAttributes(ParameterInfo, Type)
Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean)
Attribute.GetCustomAttributes(ParameterInfo, Boolean)
Attribute.IsDefined(ParameterInfo, Type)
Attribute.IsDefined(ParameterInfo, Type, Boolean)
Attribute.GetCustomAttribute(ParameterInfo, Type)
Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean)
Attribute.GetCustomAttributes(Module, Type)
Attribute.GetCustomAttributes(Module)
Attribute.GetCustomAttributes(Module, Boolean)
Attribute.GetCustomAttributes(Module, Type, Boolean)
Attribute.IsDefined(Module, Type)
Attribute.IsDefined(Module, Type, Boolean)
Attribute.GetCustomAttribute(Module, Type)
Attribute.GetCustomAttribute(Module, Type, Boolean)
Attribute.GetCustomAttributes(Assembly, Type)
Attribute.GetCustomAttributes(Assembly, Type, Boolean)
Attribute.GetCustomAttributes(Assembly)
Attribute.GetCustomAttributes(Assembly, Boolean)
Attribute.IsDefined(Assembly, Type)
Attribute.IsDefined(Assembly, Type, Boolean)
Attribute.GetCustomAttribute(Assembly, Type)
Attribute.GetCustomAttribute(Assembly, Type, Boolean)
Attribute.Equals(Object)
Attribute.GetHashCode()
Attribute.Match(Object)
Attribute.IsDefaultAttribute()
Attribute._Attribute.GetTypeInfoCount(UInt32)
Attribute._Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
Attribute._Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
Attribute._Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
Attribute.TypeId
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Config

###### Assembly: IPA.Loader.dll

##### Syntax

    [AttributeUsage(AttributeTargets.Parameter)]
    public class PreferAttribute : Attribute, _Attribute

### Constructors

| Improve this Doc View Source

#### PreferAttribute(String[])

Constructs the attribute with a specific preference list. Each entry is the extension without a '.'

##### Declaration

    public PreferAttribute(params string[] preference)

##### Parameters

Type | Name | Description
--- | --- | ---
String[] | preference | The preferences in order of preference.

### Properties

| Improve this Doc View Source

#### PreferenceOrder

The order of preference for the config type.

##### Declaration

    public string[] PreferenceOrder { get; }

##### Property Value

Type | Description
--- | ---
String[] | the list of config extensions in order of preference

### Implements

System.Runtime.InteropServices._Attribute

### Extension Methods

ReflectionUtil.SetPrivateField(Object, String, Object)
ReflectionUtil.GetPrivateField<T>(Object, String)
ReflectionUtil.SetPrivateProperty(Object, String, Object)
ReflectionUtil.InvokePrivateMethod(Object, String, Object[])
ReflectionUtil.InvokePrivateMethod<T>(Object, String, Object[])