Skip to content

Commit 4dca346

Browse files
committed
inherit List for service collection
1 parent 14160ed commit 4dca346

File tree

2 files changed

+23
-54
lines changed

2 files changed

+23
-54
lines changed
Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,14 @@
1-
using System;
21
using System.Collections;
32
using System.Collections.Generic;
43
using Microsoft.Extensions.DependencyInjection;
54

6-
namespace JsonApiDotNetCoreTests
5+
namespace JsonApiDotNetCoreTests.Helpers
76
{
8-
public class ServiceCollection : IServiceCollection
7+
public class ServiceCollection : List<ServiceDescriptor>, IServiceCollection
98
{
10-
public int IndexOf(ServiceDescriptor serviceDescriptor)
9+
IEnumerator IEnumerable.GetEnumerator()
1110
{
12-
throw new NotImplementedException();
11+
return GetEnumerator();
1312
}
14-
15-
public void Insert(int pos, ServiceDescriptor serviceDescriptor)
16-
{
17-
throw new NotImplementedException();
18-
}
19-
20-
public void RemoveAt(int pos)
21-
{
22-
throw new NotImplementedException();
23-
}
24-
25-
public bool Remove(ServiceDescriptor serviceDescriptor)
26-
{
27-
throw new NotImplementedException();
28-
}
29-
30-
public void Add(ServiceDescriptor serviceDescriptor)
31-
{
32-
throw new NotImplementedException();
33-
}
34-
35-
public void Clear()
36-
{
37-
throw new NotImplementedException();
38-
}
39-
40-
public bool Contains(ServiceDescriptor serviceDescriptor)
41-
{
42-
throw new NotImplementedException();
43-
}
44-
45-
public void CopyTo(ServiceDescriptor[] serviceDescriptor, int pos)
46-
{
47-
throw new NotImplementedException();
48-
}
49-
50-
public IEnumerable<ServiceDescriptor>.IEnumerator<ServiceDescriptor> GetEnumerator()
51-
{
52-
throw new NotImplementedException();
53-
}
54-
55-
public IEnumerator GetEnumerator()
56-
{
57-
throw new NotImplementedException();
58-
}
59-
60-
public int Count { get; set; }
61-
public bool IsReadOnly { get; set; }
62-
6313
}
6414
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>7c624b48-6336-4378-adb1-3ddf259125de</ProjectGuid>
10+
<RootNamespace>JsonApiDotNetCoreTests</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>

0 commit comments

Comments
 (0)