Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

39 lines
517 B
C#

using System;
namespace Test
{
public class BaseContext
{
}
public class MyDataContext : BaseContext
{
}
public abstract class Entity<T>
{
}
public class Person : Entity<MyDataContext>
{
}
public sealed class TheBox<T> where T : BaseContext
{
public U GetById<U> (Guid entityId) where U : Entity<T>
{
return null;
}
}
public class Program
{
public static void Main ()
{
TheBox<MyDataContext> dc = new TheBox<MyDataContext> ();
dc.GetById<Person> (Guid.NewGuid ());
}
}
}