本文整理汇总了C#中ICSharpCode.NRefactory.Ast.TypeReference.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# TypeReference.ToString方法的具体用法?C# TypeReference.ToString怎么用?C# TypeReference.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.NRefactory.Ast.TypeReference
的用法示例。
在下文中一共展示了TypeReference.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveTypeReference_ArrayOfSourceType_Works
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));
}
示例2: ResolveTypeReference_GenericDictionary_Works
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);
}
示例3: ResolveTypeReference_TwoDimArray_Works
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: ResolveTypeReference_SimplePrimitiveTypeArray_Works
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));
}
示例5: ResolveTypeReference_Simple_Works
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));
}
示例6: ResolveTypeReference_GenericList_Works
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());
}
示例7: ResolveTypeReference_SimpleArray_Works
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));
}