I have a question on something I've never seen before in C#. In the service provider in the new asp.net dependency injection, there is a method with return _ => null;
https://github.com/aspnet/DependencyInjection/blob/dev/src/Microsoft.Framework.DependencyInjection/ServiceProvider.cs Lines 63-72.
The method in question:
private Func<MyServiceProvider, object> CreateServiceAccessor(Type serviceType)
{
var callSite = GetServiceCallSite(serviceType, new HashSet<Type>());
if (callSite != null)
{
return RealizeService(_table, serviceType, callSite);
}
return _ => null;
}
What is the _
? Is it new in C# 6? Searching around for return _
doesn't return anything useful, unless you want naming conventions.