Skip to content

Commit

Permalink
Update proxy generation to handle deprecation of `DelegateProxyGenera…
Browse files Browse the repository at this point in the history
…tor`

See castleproject/Core@66ad575 for more information

castleproject#612 - Updating Windsor to support Castle.Core@5.0.0 and modern TFMs
  • Loading branch information
Jevonius committed May 14, 2022
1 parent adc59db commit 682db79
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ private object GetProxyInstance(Type type, IInterceptor[] interceptors)

private Type GetProxyType(IProxyBuilder builder, Type targetDelegateType)
{
var scope = builder.ModuleScope;
var logger = builder.Logger;
var generator = new DelegateProxyGenerator(scope, targetDelegateType)
{
Logger = logger
};
return generator.GetProxyType();
var options = new ProxyGenerationOptions();
options.AddDelegateTypeMixin(targetDelegateType);
return builder.CreateClassProxyType(typeof(object), null, options);
}
}
}

0 comments on commit 682db79

Please sign in to comment.