Decor.NET
Decor.NET copied to clipboard
A simple way to decorate a class with additional functionality using attributes.
Sample using: **With Attribute** `services.AddTransient(interfaceType, classType).Decorated();` ----------------------------- **With Action Method Filter** ``` services.AddTransient(interfaceType, classType).Decorated((method) => { if (method.IsPublic && method.IsVirtual) { return new[] { typeof(NhUnitOfWorkDecorator) }; } return []; });...
Hello, In our project, we want to use MethodDecoratorMap or a similar structure and choose the method here with a more dynamic approach instead of using attributes. Currently, we need...
Currently decorating open generic service descriptions is impossible. Example: ```csharp services.AddTransient(typeof(ISomeService), typeof(SomeService)).Decorated(); ```
User reported an issue of being unable to create a decorated object instance without parameterless constructor. Reproduced here: ```csharp using Decor; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; using Xunit; namespace Reproduce {...
There should be an easy way to check if a specific type is decorated. Notice that this has to check the full hierarchy and not just the current type. Api...