<PackageReference Include="Castle.Windsor" Version="3.2.0" />

ProxyOptionsUtil

public static class ProxyOptionsUtil
Helper support for proxy configuration.
using Castle.Core; namespace Castle.MicroKernel.Proxy { public static class ProxyOptionsUtil { public static ProxyOptions ObtainProxyOptions(this ComponentModel model, bool createOnDemand = true) { ProxyOptions proxyOptions = model.ExtendedProperties[ProxyConstants.ProxyOptionsKey] as ProxyOptions; if (proxyOptions == null && createOnDemand) { proxyOptions = new ProxyOptions(model); model.ExtendedProperties[ProxyConstants.ProxyOptionsKey] = proxyOptions; } return proxyOptions; } } }