Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillibald authored Apr 6, 2023
2 parents 59d107c + 89e10f0 commit bd1168a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AvaloniaEdit/Utils/IServiceContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ internal class ServiceContainer : IServiceContainer
{
private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>();

public ServiceContainer()
{
_services.Add(typeof(IServiceProvider), this);
_services.Add(typeof(IServiceContainer), this);
}

public object GetService(Type serviceType)
{
_services.TryGetValue(serviceType, out var service);
Expand Down

0 comments on commit bd1168a

Please sign in to comment.