Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Unity 5.11.1 logging #12

Open
amit-potdar opened this issue Jul 6, 2020 · 0 comments
Open

Issue with Unity 5.11.1 logging #12

amit-potdar opened this issue Jul 6, 2020 · 0 comments

Comments

@amit-potdar
Copy link

This changelog should explain how to migrate

Originally posted by @ENikS in https://github.com/unitycontainer/unity/issues/313#issuecomment-617993501

Hi,

In reference to https://github.com/unitycontainer/unity/issues/313

That changelog did not help us. We've resolved one issue. However, we've not idea out addPolicies usage.

`
///
/// Called when [register].
///
/// The sender.
/// The instance containing the event data.
private void OnRegister(object sender, RegisterEventArgs e)
{
System.Diagnostics.Debug.Assert(false, "OnRegister");
if (e != null && e.TypeFrom != null && e.TypeFrom.IsInterface)
{
/*var interfaceInterceptor = new Interceptor();
interfaceInterceptor.AddPolicies(e.TypeFrom, e.TypeTo, e.Name, Context.Policies);

    var interceptionBehavior = new InterceptionBehavior<LogMethodInterceptionBehavior>();
    interceptionBehavior.AddPolicies(e.TypeFrom, e.TypeTo, e.Name, Context.Policies);*/
}

}
`

At the minute, AddPolicies is throwing compile time error stating Context.Policies is read-only.

Can you assist us in resolving the issue?

Thanks,
Amit

@ENikS ENikS transferred this issue from unitycontainer/unity Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant