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

ResolveMany with Meta does NOT work but collection with Meta does work #100

Closed
dadhi opened this issue Mar 29, 2019 · 1 comment
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dadhi
Copy link
Owner

dadhi commented Mar 29, 2019

The live example and the code:

using System;
using System.Linq;
using System.Collections.Generic;
using DryIoc;
					
public class Program
{
	public static void Main()
	{
		var c = new Container();
		
		c.Register<IMany, A>(setup: Setup.With(metadataOrFuncOfMetadata: MetaKey.X));
		c.Register<IMany, B>();
		c.Register<IMany, C>(setup: Setup.With(metadataOrFuncOfMetadata: MetaKey.X));
		
		var ms1 = c.Resolve<IList<Meta<IMany, MetaKey>>>();
		var ms2 = c.ResolveMany<Meta<IMany, MetaKey>>().ToList();
		
		Console.WriteLine(ms1.Count + " vs " + ms2.Count);
	}
	
	public interface IMany {}
	public class A : IMany {}
	public class B : IMany {}
	public class C : IMany {}	
	
	public enum MetaKey { X }
}
@dadhi dadhi changed the title ResolveMany with Meta does not work but collection with Meta does work ResolveMany with Meta does NOT work but collection with Meta does work Mar 29, 2019
@dadhi dadhi self-assigned this Mar 29, 2019
@dadhi dadhi added the bug Something isn't working label Mar 29, 2019
@dadhi dadhi modified the milestones: v4.0.1, v4.0.2 Mar 29, 2019
@dadhi dadhi closed this as completed in a7cdbc3 Mar 30, 2019
@dadhi
Copy link
Owner Author

dadhi commented Mar 30, 2019

DryIoc v4.0.2 with the fix is released.

Leszek-Kowalski pushed a commit to Leszek-Kowalski/DryIoc that referenced this issue Oct 11, 2019
Leszek-Kowalski pushed a commit to Leszek-Kowalski/DryIoc that referenced this issue Oct 11, 2019
added: DryIoc.Microsoft.DependencyInjection.src package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant