本文整理汇总了C#中StringHandle.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# StringHandle.GetString方法的具体用法?C# StringHandle.GetString怎么用?C# StringHandle.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringHandle
的用法示例。
在下文中一共展示了StringHandle.GetString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateRuntimeAssemblyNameFromMetadata
private static RuntimeAssemblyName CreateRuntimeAssemblyNameFromMetadata(
MetadataReader reader,
StringHandle name,
Version version,
StringHandle culture,
BlobHandle publicKeyOrToken,
AssemblyFlags assemblyFlags)
{
AssemblyNameFlags assemblyNameFlags = AssemblyNameFlags.None;
if (0 != (assemblyFlags & AssemblyFlags.PublicKey))
assemblyNameFlags |= AssemblyNameFlags.PublicKey;
if (0 != (assemblyFlags & AssemblyFlags.Retargetable))
assemblyNameFlags |= AssemblyNameFlags.Retargetable;
int contentType = ((int)assemblyFlags) & 0x00000E00;
assemblyNameFlags |= (AssemblyNameFlags)contentType;
return new RuntimeAssemblyName(
name.GetString(reader),
version,
culture.GetString(reader),
assemblyNameFlags,
reader.GetBlobContent(publicKeyOrToken).ToArray()
);
}
示例2: CompareTo
public int CompareTo(StringHandle that)
{
if (type == StringHandleType.UTF8 && that.type == StringHandleType.UTF8)
return bufferReader.Compare(offset, length, that.offset, that.length);
return string.Compare(GetString(), that.GetString(), StringComparison.Ordinal);
}
示例3: Equals2
private bool Equals2(StringHandle s2)
{
switch (s2.type)
{
case StringHandleType.UTF8:
return Equals2(s2.offset, s2.length, s2.bufferReader);
default:
return Equals2(s2.GetString());
}
}