예제 #1
0
    public void ResolveTypeReference_GenericDictionary_Works()
    {
      TypeReference reference = new TypeReference("Dictionary", new List<TypeReference>(new TypeReference[] { new TypeReference("string"), new TypeReference("DateTime") }));
      _typeResolver.UseNamespace("System");
      _typeResolver.UseNamespace("System.Collections.Generic");

      Assert.AreEqual("Dictionary<string,DateTime>", reference.ToString());
      string actual = _typeResolver.Resolve(reference);
    }
예제 #2
0
 public override string ToString()
 {
     return("[InnerClassTypeReference: (" + baseType.ToString() + ")." + base.ToString() + "]");
 }
예제 #3
0
    public void ResolveTypeReference_TwoDimArray_Works()
    {
      TypeReference reference = new TypeReference("DateTime", new int[] { 0, 0 });

      _typeResolver.UseNamespace("System");

      Assert.AreEqual("DateTime[][]", reference.ToString());
      Assert.AreEqual("System.DateTime[][]", _typeResolver.Resolve(reference));
    }
예제 #4
0
    public void ResolveTypeReference_ArrayOfSourceType_Works()
    {
      TypeReference reference = new TypeReference("RadClass", new int[] { 0, 0 });

      _typeResolver.AddTableEntry("SomeNamespace.Utility.RadClass");

      _typeResolver.UseNamespace("System");
      _typeResolver.UseNamespace("SomeNamespace.Utility");

      Assert.AreEqual("RadClass[][]", reference.ToString());
      Assert.AreEqual("SomeNamespace.Utility.RadClass[][]", _typeResolver.Resolve(reference));
    }
예제 #5
0
    public void ResolveTypeReference_SimplePrimitiveTypeArray_Works()
    {
      TypeReference reference = new TypeReference("long", new int[] { 0 });

      _typeResolver.UseNamespace("System");

      Assert.AreEqual("long[]", reference.ToString());
      Assert.AreEqual("System.Int64[]", _typeResolver.Resolve(reference));
    }
예제 #6
0
    public void ResolveTypeReference_Simple_Works()
    {
      TypeReference reference = new TypeReference("DateTime");

      _typeResolver.UseNamespace("System");

      Assert.AreEqual("DateTime", reference.ToString());
      Assert.AreEqual("System.DateTime", _typeResolver.Resolve(reference));
    }
예제 #7
0
 public override string ToString()
 {
     return(baseType.ToString() + "+" + base.ToString());
 }
예제 #8
0
		public void ResolveTypeReference_GenericList_Works()
		{
			var reference = new TypeReference("List", new List<TypeReference>(new[] {new TypeReference("string")}));
			typeResolver.UseNamespace("System");
			typeResolver.UseNamespace("System.Collections.Generic");

			Assert.AreEqual("List<string>", reference.ToString());
		}
예제 #9
0
		public void ResolveTypeReference_SimpleArray_Works()
		{
			var reference = new TypeReference("DateTime", new[] {0});

			typeResolver.UseNamespace("System");

			Assert.AreEqual("DateTime[]", reference.ToString());
			Assert.AreEqual("System.DateTime[]", typeResolver.Resolve(reference));
		}