本文整理汇总了C#中ITypeSymbol.FullNameEquals方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeSymbol.FullNameEquals方法的具体用法?C# ITypeSymbol.FullNameEquals怎么用?C# ITypeSymbol.FullNameEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeSymbol
的用法示例。
在下文中一共展示了ITypeSymbol.FullNameEquals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsAtomType
internal static bool IsAtomType(TypeKind typeKind, ITypeSymbol typeSymbol)
{
switch (typeKind)
{
case TypeKind.String:
return typeSymbol.SpecialType == SpecialType.System_String;
case TypeKind.IgnoreCaseString:
return typeSymbol.FullNameEquals(IgnoreCaseStringNameParts);
case TypeKind.Char:
return typeSymbol.SpecialType == SpecialType.System_Char;
case TypeKind.Decimal:
return typeSymbol.SpecialType == SpecialType.System_Decimal;
case TypeKind.Int64:
return typeSymbol.SpecialType == SpecialType.System_Int64;
case TypeKind.Int32:
return typeSymbol.SpecialType == SpecialType.System_Int32;
case TypeKind.Int16:
return typeSymbol.SpecialType == SpecialType.System_Int16;
case TypeKind.SByte:
return typeSymbol.SpecialType == SpecialType.System_SByte;
case TypeKind.UInt64:
return typeSymbol.SpecialType == SpecialType.System_UInt64;
case TypeKind.UInt32:
return typeSymbol.SpecialType == SpecialType.System_UInt32;
case TypeKind.UInt16:
return typeSymbol.SpecialType == SpecialType.System_UInt16;
case TypeKind.Byte:
return typeSymbol.SpecialType == SpecialType.System_Byte;
case TypeKind.Double:
return typeSymbol.SpecialType == SpecialType.System_Double;
case TypeKind.Single:
return typeSymbol.SpecialType == SpecialType.System_Single;
case TypeKind.Boolean:
return typeSymbol.SpecialType == SpecialType.System_Boolean;
case TypeKind.Binary:
return typeSymbol.FullNameEquals(BinaryNameParts);
case TypeKind.Guid:
return typeSymbol.FullNameEquals(CS.GuidNameParts);
case TypeKind.TimeSpan:
return typeSymbol.FullNameEquals(CS.TimeSpanNameParts);
case TypeKind.DateTimeOffset:
return typeSymbol.FullNameEquals(CS.DateTimeOffsetNameParts);
default:
throw new ArgumentException("Invalid type kind: " + typeKind.ToString());
}
}