Code Monkey home page Code Monkey logo

Comments (11)

mpaul31 avatar mpaul31 commented on August 23, 2024 1

I was able to resolve this by moving the INotification marker interface to a base class.

thanks for your help!

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

Hi,
Could you create a complete test in DryIoc.IssueTests project?

from dryioc.

mpaul31 avatar mpaul31 commented on August 23, 2024

OK but do you agree this is a bug? Sorry not trying to be rude I just need to figure out if I need to swap DI containers if it is until a fix is made.

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

I don't understand this fully. If I see, play with complete sample / test, it will speedup things.
I doubt that the problem is in DryIoc, cause we talk about basic feature. But again, hard to be sure until I see a full example.

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

Ohh, what version of DryIoc do you use?

Now I have remembered that "maybe" related issue was fixed in v3.1 (now in preview). Try it out if you are using a lesser version.

from dryioc.

mpaul31 avatar mpaul31 commented on August 23, 2024

Ohh, what version of DryIoc do you use?

Now I have remembered that "maybe" related issue was fixed in v3.1 (now in preview). Try it out if you are using a lesser version.

The preview version did not resolve the issue.

from dryioc.

mpaul31 avatar mpaul31 commented on August 23, 2024

i had to go out of town unexpected for the weekend. is this something you would have time to investigate? it's literally as simple as the code sample i show.

any help would be great!

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

Hopefully, will have time to check.

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

Hi @mpaul31,

I have added the tests to demonstrate that it cannot be "simply" achievable. So it is not a DryIoc fault, nor the MediatR's. I tried the case without containers and MediatR with the same results.

First, you need to figure out how you would do it by hand, then we think how to automate it with libs.

from dryioc.

mpaul31 avatar mpaul31 commented on August 23, 2024

from dryioc.

dadhi avatar dadhi commented on August 23, 2024

In order to support such a notification we should construct something like this:

Func<N, Task> Handler =
    async n => await Task.WhenAll(new[] {  
        ((INHandler<N>)new NHandler()).Handle(n),
        ((INHandler<K>)new NHandler()).Handle(n)
    });

class K {}
class N : K {}
class NHandler : IHandler<N>, IHandler<K> {}

from dryioc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.