/// <summary>
/// Wraps an interface. The target argument must be an
/// object capable of responding to the interface messages, or
/// your interceptors must be capable of respoding to them.
/// </summary>
/// <param name="inter">Interface to be wrapped</param>
/// <param name="target">The object that responds to the interface messages</param>
/// <returns>A proxy</returns>
public virtual object WrapInterface(Type inter, object target)
{
AssertUtil.ArgumentNotNull(target, "target");
AssertUtil.ArgumentIsInterface(inter, "interface");
AspectDefinition[] aspects = AspectMatcher.Match(inter, Configuration.Aspects);
AspectDefinition aspectdef = Union(aspects);
return(ProxyFactory.CreateInterfaceProxy(inter, target, aspectdef));
}