public interface IMarker {}
public class Impl1 : IMarker {}
public static T? GetServiceDefaultConstruct<T>() where T : IMarker, new() {
public static T? GetServiceNull<T>() where T : IMarker {
public static T? GetServiceNullExplicitConstraint<T>() where T : class,IMarker {
public static T? GetService<T>() where T : class,IMarker {
if (typeof(T) == typeof(Impl1))
return (T) (object) new Impl1();