Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

236 lines
19 KiB
C#

using System;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace System
{
/// <summary>Contains methods to create types of objects locally or remotely, or obtain references to existing remote objects. This class cannot be inherited.</summary>
// Token: 0x020000AC RID: 172
[Token(Token = "0x20000AC")]
[ComDefaultInterface(typeof(_Activator))]
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
public sealed class Activator
{
/// <summary>Creates an instance of the specified type using the constructor that best matches the specified parameters.</summary>
/// <param name="type">The type of object to create.</param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="type" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted.</param>
/// <param name="binder">An object that uses <paramref name="bindingAttr" /> and <paramref name="args" /> to seek and identify the <paramref name="type" /> constructor. If <paramref name="binder" /> is <see langword="null" />, the default binder is used.</param>
/// <param name="args">An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If <paramref name="args" /> is an empty array or <see langword="null" />, the constructor that takes no parameters (the default constructor) is invoked.</param>
/// <param name="culture">Culture-specific information that governs the coercion of <paramref name="args" /> to the formal types declared for the <paramref name="type" /> constructor. If <paramref name="culture" /> is <see langword="null" />, the <see cref="T:System.Globalization.CultureInfo" /> for the current thread is used.</param>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="type" /> is not a <see langword="RuntimeType" />.
/// -or-
/// <paramref name="type" /> is an open generic type (that is, the <see cref="P:System.Type.ContainsGenericParameters" /> property returns <see langword="true" />).</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="type" /> cannot be a <see cref="T:System.Reflection.Emit.TypeBuilder" />.
/// -or-
/// Creation of <see cref="T:System.TypedReference" />, <see cref="T:System.ArgIterator" />, <see cref="T:System.Void" />, and <see cref="T:System.RuntimeArgumentHandle" /> types, or arrays of those types, is not supported.
/// -or-
/// The assembly that contains <paramref name="type" /> is a dynamic assembly that was created with <see cref="F:System.Reflection.Emit.AssemblyBuilderAccess.Save" />.
/// -or-
/// The constructor that best matches <paramref name="args" /> has <see langword="varargs" /> arguments.</exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The constructor being called throws an exception.</exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor.</exception>
/// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.</exception>
/// <exception cref="T:System.Runtime.InteropServices.InvalidComObjectException">The COM type was not obtained through <see cref="Overload:System.Type.GetTypeFromProgID" /> or <see cref="Overload:System.Type.GetTypeFromCLSID" />.</exception>
/// <exception cref="T:System.MissingMethodException">No matching constructor was found.</exception>
/// <exception cref="T:System.Runtime.InteropServices.COMException">
/// <paramref name="type" /> is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="type" /> is not a valid type.</exception>
// Token: 0x060004D9 RID: 1241 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004D9")]
[Address(RVA = "0x26BBE30", Offset = "0x26BAC30", VA = "0x1826BBE30")]
public static object CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture)
{
return null;
}
/// <summary>Creates an instance of the specified type using the constructor that best matches the specified parameters.</summary>
/// <param name="type">The type of object to create.</param>
/// <param name="bindingAttr">A combination of zero or more bit flags that affect the search for the <paramref name="type" /> constructor. If <paramref name="bindingAttr" /> is zero, a case-sensitive search for public constructors is conducted.</param>
/// <param name="binder">An object that uses <paramref name="bindingAttr" /> and <paramref name="args" /> to seek and identify the <paramref name="type" /> constructor. If <paramref name="binder" /> is <see langword="null" />, the default binder is used.</param>
/// <param name="args">An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If <paramref name="args" /> is an empty array or <see langword="null" />, the constructor that takes no parameters (the default constructor) is invoked.</param>
/// <param name="culture">Culture-specific information that governs the coercion of <paramref name="args" /> to the formal types declared for the <paramref name="type" /> constructor. If <paramref name="culture" /> is <see langword="null" />, the <see cref="T:System.Globalization.CultureInfo" /> for the current thread is used.</param>
/// <param name="activationAttributes">An array of one or more attributes that can participate in activation. This is typically an array that contains a single <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> object that specifies the URL that is required to activate a remote object.
/// This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.</param>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="type" /> is not a <see langword="RuntimeType" />.
/// -or-
/// <paramref name="type" /> is an open generic type (that is, the <see cref="P:System.Type.ContainsGenericParameters" /> property returns <see langword="true" />).</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="type" /> cannot be a <see cref="T:System.Reflection.Emit.TypeBuilder" />.
/// -or-
/// Creation of <see cref="T:System.TypedReference" />, <see cref="T:System.ArgIterator" />, <see cref="T:System.Void" />, and <see cref="T:System.RuntimeArgumentHandle" /> types, or arrays of those types, is not supported.
/// -or-
/// <paramref name="activationAttributes" /> is not an empty array, and the type being created does not derive from <see cref="T:System.MarshalByRefObject" />.
/// -or-
/// The assembly that contains <paramref name="type" /> is a dynamic assembly that was created with <see cref="F:System.Reflection.Emit.AssemblyBuilderAccess.Save" />.
/// -or-
/// The constructor that best matches <paramref name="args" /> has <see langword="varargs" /> arguments.</exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The constructor being called throws an exception.</exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor.</exception>
/// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.</exception>
/// <exception cref="T:System.Runtime.InteropServices.InvalidComObjectException">The COM type was not obtained through <see cref="Overload:System.Type.GetTypeFromProgID" /> or <see cref="Overload:System.Type.GetTypeFromCLSID" />.</exception>
/// <exception cref="T:System.MissingMethodException">No matching constructor was found.</exception>
/// <exception cref="T:System.Runtime.InteropServices.COMException">
/// <paramref name="type" /> is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="type" /> is not a valid type.</exception>
// Token: 0x060004DA RID: 1242 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004DA")]
[Address(RVA = "0x26BBAA0", Offset = "0x26BA8A0", VA = "0x1826BBAA0")]
public static object CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
{
return null;
}
/// <summary>Creates an instance of the specified type using the constructor that best matches the specified parameters.</summary>
/// <param name="type">The type of object to create.</param>
/// <param name="args">An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If <paramref name="args" /> is an empty array or <see langword="null" />, the constructor that takes no parameters (the default constructor) is invoked.</param>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="type" /> is not a <see langword="RuntimeType" />.
/// -or-
/// <paramref name="type" /> is an open generic type (that is, the <see cref="P:System.Type.ContainsGenericParameters" /> property returns <see langword="true" />).</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="type" /> cannot be a <see cref="T:System.Reflection.Emit.TypeBuilder" />.
/// -or-
/// Creation of <see cref="T:System.TypedReference" />, <see cref="T:System.ArgIterator" />, <see cref="T:System.Void" />, and <see cref="T:System.RuntimeArgumentHandle" /> types, or arrays of those types, is not supported.
/// -or-
/// The assembly that contains <paramref name="type" /> is a dynamic assembly that was created with <see cref="F:System.Reflection.Emit.AssemblyBuilderAccess.Save" />.
/// -or-
/// The constructor that best matches <paramref name="args" /> has <see langword="varargs" /> arguments.</exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The constructor being called throws an exception.</exception>
/// <exception cref="T:System.MethodAccessException">In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, <see cref="T:System.MemberAccessException" />, instead.
///
///
///
///
/// The caller does not have permission to call this constructor.</exception>
/// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.</exception>
/// <exception cref="T:System.Runtime.InteropServices.InvalidComObjectException">The COM type was not obtained through <see cref="Overload:System.Type.GetTypeFromProgID" /> or <see cref="Overload:System.Type.GetTypeFromCLSID" />.</exception>
/// <exception cref="T:System.MissingMethodException">In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, <see cref="T:System.MissingMemberException" />, instead.
///
///
///
///
/// No matching public constructor was found.</exception>
/// <exception cref="T:System.Runtime.InteropServices.COMException">
/// <paramref name="type" /> is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="type" /> is not a valid type.</exception>
// Token: 0x060004DB RID: 1243 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004DB")]
[Address(RVA = "0x26BBE70", Offset = "0x26BAC70", VA = "0x1826BBE70")]
public static object CreateInstance(Type type, params object[] args)
{
return null;
}
/// <summary>Creates an instance of the specified type using that type's default constructor.</summary>
/// <param name="type">The type of object to create.</param>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="type" /> is not a <see langword="RuntimeType" />.
/// -or-
/// <paramref name="type" /> is an open generic type (that is, the <see cref="P:System.Type.ContainsGenericParameters" /> property returns <see langword="true" />).</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="type" /> cannot be a <see cref="T:System.Reflection.Emit.TypeBuilder" />.
/// -or-
/// Creation of <see cref="T:System.TypedReference" />, <see cref="T:System.ArgIterator" />, <see cref="T:System.Void" />, and <see cref="T:System.RuntimeArgumentHandle" /> types, or arrays of those types, is not supported.
/// -or-
/// The assembly that contains <paramref name="type" /> is a dynamic assembly that was created with <see cref="F:System.Reflection.Emit.AssemblyBuilderAccess.Save" />.</exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The constructor being called throws an exception.</exception>
/// <exception cref="T:System.MethodAccessException">In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, <see cref="T:System.MemberAccessException" />, instead.
///
///
///
///
/// The caller does not have permission to call this constructor.</exception>
/// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.</exception>
/// <exception cref="T:System.Runtime.InteropServices.InvalidComObjectException">The COM type was not obtained through <see cref="Overload:System.Type.GetTypeFromProgID" /> or <see cref="Overload:System.Type.GetTypeFromCLSID" />.</exception>
/// <exception cref="T:System.MissingMethodException">In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, <see cref="T:System.MissingMemberException" />, instead.
///
///
///
///
/// No matching public constructor was found.</exception>
/// <exception cref="T:System.Runtime.InteropServices.COMException">
/// <paramref name="type" /> is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="type" /> is not a valid type.</exception>
// Token: 0x060004DC RID: 1244 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004DC")]
[Address(RVA = "0x26BBE60", Offset = "0x26BAC60", VA = "0x1826BBE60")]
public static object CreateInstance(Type type)
{
return null;
}
/// <summary>Creates an instance of the specified type using that type's default constructor.</summary>
/// <param name="type">The type of object to create.</param>
/// <param name="nonPublic">
/// <see langword="true" /> if a public or nonpublic default constructor can match; <see langword="false" /> if only a public default constructor can match.</param>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="type" /> is not a <see langword="RuntimeType" />.
/// -or-
/// <paramref name="type" /> is an open generic type (that is, the <see cref="P:System.Type.ContainsGenericParameters" /> property returns <see langword="true" />).</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="type" /> cannot be a <see cref="T:System.Reflection.Emit.TypeBuilder" />.
/// -or-
/// Creation of <see cref="T:System.TypedReference" />, <see cref="T:System.ArgIterator" />, <see cref="T:System.Void" />, and <see cref="T:System.RuntimeArgumentHandle" /> types, or arrays of those types, is not supported.
/// -or-
/// The assembly that contains <paramref name="type" /> is a dynamic assembly that was created with <see cref="F:System.Reflection.Emit.AssemblyBuilderAccess.Save" />.</exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The constructor being called throws an exception.</exception>
/// <exception cref="T:System.MethodAccessException">The caller does not have permission to call this constructor.</exception>
/// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.</exception>
/// <exception cref="T:System.Runtime.InteropServices.InvalidComObjectException">The COM type was not obtained through <see cref="Overload:System.Type.GetTypeFromProgID" /> or <see cref="Overload:System.Type.GetTypeFromCLSID" />.</exception>
/// <exception cref="T:System.MissingMethodException">No matching public constructor was found.</exception>
/// <exception cref="T:System.Runtime.InteropServices.COMException">
/// <paramref name="type" /> is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.</exception>
/// <exception cref="T:System.TypeLoadException">
/// <paramref name="type" /> is not a valid type.</exception>
// Token: 0x060004DD RID: 1245 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004DD")]
[Address(RVA = "0x26BBCB0", Offset = "0x26BAAB0", VA = "0x1826BBCB0")]
public static object CreateInstance(Type type, bool nonPublic)
{
return null;
}
/// <summary>Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor.</summary>
/// <typeparam name="T">The type to create.</typeparam>
/// <returns>A reference to the newly created object.</returns>
/// <exception cref="T:System.MissingMethodException">In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, <see cref="T:System.MissingMemberException" />, instead.
///
///
///
///
/// The type that is specified for <paramref name="T" /> does not have a parameterless constructor.</exception>
// Token: 0x060004DE RID: 1246 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60004DE")]
[Address(RVA = "0x15F56F0", Offset = "0x15F44F0", VA = "0x1815F56F0")]
public static T CreateInstance<T>()
{
return null;
}
}
}