-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ClassWithAmbiguousCtors.cs
39 lines (31 loc) · 1.04 KB
/
ClassWithAmbiguousCtors.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes
{
public class ClassWithAmbiguousCtors
{
public ClassWithAmbiguousCtors(string data)
{
CtorUsed = "string";
}
public ClassWithAmbiguousCtors(IFakeService service, string data)
{
CtorUsed = "IFakeService, string";
}
public ClassWithAmbiguousCtors(IFakeService service, int data)
{
CtorUsed = "IFakeService, int";
}
public ClassWithAmbiguousCtors(IFakeService service, string data1, int data2)
{
FakeService = service;
Data1 = data1;
Data2 = data2;
CtorUsed = "IFakeService, string, string";
}
public IFakeService FakeService { get; }
public string Data1 { get; }
public int Data2 { get; }
public string CtorUsed { get; set; }
}
}