-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDummyServiceProvider.cs
More file actions
34 lines (31 loc) · 1.02 KB
/
DummyServiceProvider.cs
File metadata and controls
34 lines (31 loc) · 1.02 KB
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
using System;
using System.ComponentModel;
namespace Ultz.Extensions.Commands
{
/// <summary>
/// Represents a dummy <see cref="IServiceProvider" />.
/// Returns <see langword="null" /> for any service <see cref="Type" /> requested.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class DummyServiceProvider : IServiceProvider
{
/// <summary>
/// Gets the singleton instance of the <see cref="DummyServiceProvider" />.
/// </summary>
public static readonly DummyServiceProvider Instance = new DummyServiceProvider();
private DummyServiceProvider()
{
}
/// <summary>
/// Returns <see langword="null" />.
/// </summary>
/// <param name="serviceType"> The <see cref="Type" /> of the service to request. </param>
/// <returns>
/// <see langword="null" />.
/// </returns>
public object GetService(Type serviceType)
{
return null;
}
}
}