File: MonoGenericInstanceType.cs

package info (click to toggle)
mono-debugger 0.60%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,556 kB
  • ctags: 22,787
  • sloc: ansic: 99,407; cs: 42,429; sh: 9,192; makefile: 376
file content (33 lines) | stat: -rw-r--r-- 764 bytes parent folder | download
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
using System;
using System.Text;
using Cecil = Mono.Cecil;

namespace Mono.Debugger.Languages.Mono
{
	internal class MonoGenericInstanceType : MonoClassType
	{
		public readonly TargetType UnderlyingType;
		string full_name;

		public MonoGenericInstanceType (MonoSymbolFile file,
						MonoClassType underlying_type, TargetType[] type_args)
			: base (file, underlying_type.Type)
		{
			this.UnderlyingType = underlying_type;

			StringBuilder sb = new StringBuilder (underlying_type.Name);
			sb.Append ('<');
			for (int i = 0; i < type_args.Length; i++) {
				if (i > 0)
					sb.Append (',');
				sb.Append (type_args [i].Name);
			}
			sb.Append ('>');
			full_name = sb.ToString ();
		}

		public override string Name {
			get { return full_name; }
		}
	}
}