What was commented on the links didn't work for me, because they are trying to do what castle.core.dynamic is trying to do behind the scene.
For instance, if I call ProxyUtil.GetUnproxiedType() (<a class="postlink" href="https://github.com/castleproject/Core/blob/master/src/Castle.Core/DynamicProxy/ProxyUtil.cs#L66">https://github.com/castleproject/Core/b ... til.cs#L66</a>) it returns {CompName}.{projName}.Authorization.LogInManager, and that's correct; but it gets it wrong when call ProxyUtil.GetUnproxiedInstance(), because it keeps returning the proxied class Castle.Proxies.LogInManagerProxy as it were the target.
Is there any other approach? Also, What kind of target is AspnetZero is using <a class="postlink" href="https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-kinds-of-proxy-objects.md">https://github.com/castleproject/Core/b ... objects.md</a> ? Last, Where the parameters for the controller are being passed?
Thanks for your time!
Hi,
We are trying to inherit the following class, because we need to define a different behavior based on business rules:
LogInManager : AbpLogInManager<Tenant, Role, User>, ILogInManager
{
...
}
Inherit like:
LogInManagerLocal : LogInManager
{
...
}
When we try to parse these classes on the method WinAuthenticate on {projectName}\src\weber.{ProjectName}.web.core\controllers\tokenauthcontroller.cs
[Route("api/[controller]/[action]")]
public class TokenAuthController : VFAOControllerBase
{
TokenAuthController(LogInManager logInManager,...){}
...
public async Task<AuthenticateResultModel> WinAuthenticate([FromBody] AuthenticateModel model)
{
var childObj = logInManager as LogInManagerLocal
....
}
}
The variable childObj is null, because the variable is proxied by the time it gets into the method, so instead of being of type LogInManager, is Castle.Dynamic.LogInManagerProxy. Is there a well-design approach that allow us to get the base clase, in this case would be from LogInManager type?
Thanks.
Hi,
Is there available a test project version using EF In-Memory instead of sqlite instead that we can download?
Thanks!