private Type GetInvocationType(MetaMethod method, ClassEmitter emitter, ProxyGenerationOptions options)
{
var scope = emitter.ModuleScope;
var key = new CacheKey(method.Method, CompositionInvocationTypeGenerator.BaseType, null, null);
// no locking required as we're already within a lock
var invocation = scope.GetFromCache(key);
if (invocation != null)
{
return invocation;
}
invocation = new CompositionInvocationTypeGenerator(method.Method.DeclaringType,
method,
method.Method,
false,
null)
.Generate(emitter, options, namingScope)
.BuildType();
scope.RegisterInCache(key, invocation);
return invocation;
}
}