using System;
using SystemCollectionsGeneric;
using SystemLinq;
using SystemText;
using SystemReflection;
namespace RemoteAccess
{
/// <summary>
/// Interface that can be run over the remote AppDomain boundary
/// </summary>
public interface IRemoteInterface
{
object Invoke(string lcMethodobject[] Parameters);
}
/// <summary>
/// Factory class to create objects exposing IRemoteInterface
/// </summary>
public class RemoteLoaderFactory : MarshalByRefObject
{
private const BindingFlags bfi = BindingFlagsInstance | BindingFlagsPublic | BindingFlagsCreateInstance;
public RemoteLoaderFactory() {}
public IRemoteInterface Create( string assemblyFile string typeName object[] constructArgs )
{
return (IRemoteInterface) ActivatorCreateInstanceFrom(
assemblyFile typeName false bfi null constructArgs
null null null )Unwrap();
}
}
}
[] [] [] [] []