namespace IoC.Tests.UsageScenarios { using System; using System.Diagnostics.CodeAnalysis; using Shouldly; using Xunit; [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] public class Tuples { [Fact] public void Run() { // $visible=true // $tag=3 BCL types // $priority=01 // $description=Tuples // $header=[Tuple](https://docs.microsoft.com/en-us/dotnet/api/system.tuple) has a set of elements that should be resolved at the same time. // { using var container = Container .Create() .Bind().To() .Bind().To() .Bind().To(ctx => new NamedService(ctx.Container.Inject(), "some name")) .Container; // Resolve an instance of type Tuple var tuple = container.Resolve>(); // } // Check items tuple.Item1.ShouldBeOfType(); tuple.Item2.ShouldBeOfType(); } } }