using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Globalization;
namespace SuperSocket.SocketEngine
{
///
/// Extensions for .Net 3.5
///
public static class Extensions
{
///
/// Creates a new instance of the specified type defined in the specified assembly file.
///
/// The app domain.
/// The assembly file.
/// Name of the type.
/// if set to true [ignore case].
/// The binding attr.
/// The binder.
/// The args.
/// The culture.
/// The activation attributes.
///
public static object CreateInstanceAndUnwrap(this AppDomain appDomain, string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
{
return appDomain.CreateInstanceAndUnwrap(assemblyFile, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, AppDomain.CurrentDomain.Evidence);
}
///
/// Creates the instance from.
///
/// The app domain.
/// The assembly file.
/// Name of the type.
/// if set to true [ignore case].
/// The binding attr.
/// The binder.
/// The args.
/// The culture.
/// The activation attributes.
///
public static object CreateInstanceFrom(this AppDomain appDomain, string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
{
return appDomain.CreateInstanceFrom(assemblyFile, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes, AppDomain.CurrentDomain.Evidence);
}
}
}