Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-461.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ad8228ed289784b8dbed42ba2f24095a7de1bf0 (plain)
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
35
36
37
38
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 ());
		}
	}
}