pamidur / aspect-injector

AOP framework for .NET (c#, vb, etc)
Apache License 2.0
745 stars 112 forks source link

#144 Cache scoped items #146

Closed MaciejWanat closed 3 years ago

MaciejWanat commented 3 years ago

I've done a bit more than I suggested in https://github.com/pamidur/aspect-injector/issues/144, so here's the list of things I've done:

I got a bit confused in line 58, because there are no tests for multiple triggers. So I figured I will use Any to define which key to use, but I'm not sure whether its correct.

I hope you like the changes :)

MaciejWanat commented 3 years ago

This failed test is passing when ran directly, doesn't when tests are run altogether.

MaciejWanat commented 3 years ago

Using method.DeclaringType.FullName ends up with behaving in really strange way, so I've changed it to method, which should work just as good - tests passes correctly.

MaciejWanat commented 3 years ago

@pamidur when is this change expected to be realeased?

pamidur commented 3 years ago

Monday-Tuesday I think, I have a few more fixes in mind.

pamidur commented 3 years ago

@MaciejWanat, one thing I will change is PerInstance by default equals true, to be backward compatible with previous versions

MaciejWanat commented 3 years ago

@pamidur good idea, I was thinking about the same suggestion

pamidur commented 3 years ago

I also found an issue in AI with properties from base classes in attributes, I need to fix before the release

pamidur commented 3 years ago

Released as https://www.nuget.org/packages/Aspects.Cache/1.0.2