[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern unsafe void _GetName(IntPtr scope, int mdToken, void** name);
- public unsafe Utf8String GetName(int mdToken)
+ public unsafe MdUtf8String GetName(int mdToken)
{
void* name;
_GetName(m_metadataImport2, mdToken, &name);
- return new Utf8String(name);
+ return new MdUtf8String(name);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern unsafe void _GetNamespace(IntPtr scope, int mdToken, void** namesp);
- public unsafe Utf8String GetNamespace(int mdToken)
+ public unsafe MdUtf8String GetNamespace(int mdToken)
{
void* namesp;
_GetNamespace(m_metadataImport2, mdToken, &namesp);
- return new Utf8String(namesp);
+ return new MdUtf8String(namesp);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
int _attributes;
void* _importName, _importDll;
_GetPInvokeMap(m_metadataImport2, token, out _attributes, &_importName, &_importDll);
- importName = new Utf8String(_importName).ToString();
- importDll = new Utf8String(_importDll).ToString();
+ importName = new MdUtf8String(_importName).ToString();
+ importDll = new MdUtf8String(_importDll).ToString();
attributes = (PInvokeAttributes)_attributes;
}
get
{
if (m_name == null)
- m_name = new Utf8String(m_utf8name).ToString();
+ m_name = new MdUtf8String(m_utf8name).ToString();
return m_name;
}
get
{
if (m_name == null)
- m_name = new Utf8String(m_utf8name).ToString();
+ m_name = new MdUtf8String(m_utf8name).ToString();
return m_name;
}
private struct Filter
{
- private Utf8String m_name;
+ private MdUtf8String m_name;
private MemberListType m_listType;
private uint m_nameHash;
public unsafe Filter(byte* pUtf8Name, int cUtf8Name, MemberListType listType)
{
- m_name = new Utf8String((void*)pUtf8Name, cUtf8Name);
+ m_name = new MdUtf8String((void*)pUtf8Name, cUtf8Name);
m_listType = listType;
m_nameHash = 0;
}
}
- public bool Match(Utf8String name)
+ public bool Match(MdUtf8String name)
{
bool retVal = true;
if (filter.RequiresStringComparison())
{
- Utf8String name;
+ MdUtf8String name;
name = scope.GetName(tkField);
if (!filter.Match(name))
if (filter.RequiresStringComparison())
{
- Utf8String name;
+ MdUtf8String name;
name = scope.GetName(tkEvent);
if (!filter.Match(name))
continue;
}
- Utf8String name;
+ MdUtf8String name;
name = declaringType.GetRuntimeModule().MetadataImport.GetName(tkProperty);
if (!filter.Match(name))
}
#region Library
- internal unsafe struct Utf8String
+ internal unsafe struct MdUtf8String
{
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern unsafe bool EqualsCaseSensitive(void* szLhs, void* szRhs, int cSz);
private void* m_pStringHeap; // This is the raw UTF8 string.
private int m_StringHeapByteLength;
- internal Utf8String(void* pStringHeap)
+ internal MdUtf8String(void* pStringHeap)
{
m_pStringHeap = pStringHeap;
if (pStringHeap != null)
}
}
- internal unsafe Utf8String(void* pUtf8String, int cUtf8String)
+ internal unsafe MdUtf8String(void* pUtf8String, int cUtf8String)
{
m_pStringHeap = pUtf8String;
m_StringHeapByteLength = cUtf8String;
}
- internal unsafe bool Equals(Utf8String s)
+ internal unsafe bool Equals(MdUtf8String s)
{
if (m_pStringHeap == null)
{
}
if ((s.m_StringHeapByteLength == m_StringHeapByteLength) && (m_StringHeapByteLength != 0))
{
- return Utf8String.EqualsCaseSensitive(s.m_pStringHeap, m_pStringHeap, m_StringHeapByteLength);
+ return MdUtf8String.EqualsCaseSensitive(s.m_pStringHeap, m_pStringHeap, m_StringHeapByteLength);
}
return false;
}
- internal unsafe bool EqualsCaseInsensitive(Utf8String s)
+ internal unsafe bool EqualsCaseInsensitive(MdUtf8String s)
{
if (m_pStringHeap == null)
{
}
if ((s.m_StringHeapByteLength == m_StringHeapByteLength) && (m_StringHeapByteLength != 0))
{
- return Utf8String.EqualsCaseInsensitive(s.m_pStringHeap, m_pStringHeap, m_StringHeapByteLength);
+ return MdUtf8String.EqualsCaseInsensitive(s.m_pStringHeap, m_pStringHeap, m_StringHeapByteLength);
}
return false;
}
internal unsafe uint HashCaseInsensitive()
{
- return Utf8String.HashCaseInsensitive(m_pStringHeap, m_StringHeapByteLength);
+ return MdUtf8String.HashCaseInsensitive(m_pStringHeap, m_StringHeapByteLength);
}
public override string ToString()
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern void* _GetUtf8Name(RuntimeType type);
- internal static Utf8String GetUtf8Name(RuntimeType type)
+ internal static MdUtf8String GetUtf8Name(RuntimeType type)
{
- return new Utf8String(_GetUtf8Name(type));
+ return new MdUtf8String(_GetUtf8Name(type));
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern void* _GetUtf8Name(RuntimeMethodHandleInternal method);
- internal static Utf8String GetUtf8Name(RuntimeMethodHandleInternal method)
+ internal static MdUtf8String GetUtf8Name(RuntimeMethodHandleInternal method)
{
- return new Utf8String(_GetUtf8Name(method));
+ return new MdUtf8String(_GetUtf8Name(method));
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern unsafe void* _GetUtf8Name(RuntimeFieldHandleInternal field);
- internal static unsafe Utf8String GetUtf8Name(RuntimeFieldHandleInternal field) { return new Utf8String(_GetUtf8Name(field)); }
+ internal static unsafe MdUtf8String GetUtf8Name(RuntimeFieldHandleInternal field) { return new MdUtf8String(_GetUtf8Name(field)); }
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern bool MatchesNameHash(RuntimeFieldHandleInternal handle, uint hash);
FCFuncEnd()
-FCFuncStart(gUtf8String)
- FCFuncElement("EqualsCaseSensitive", Utf8String::EqualsCaseSensitive)
- QCFuncElement("EqualsCaseInsensitive", Utf8String::EqualsCaseInsensitive)
- QCFuncElement("HashCaseInsensitive", Utf8String::HashCaseInsensitive)
+FCFuncStart(gMdUtf8String)
+ FCFuncElement("EqualsCaseSensitive", MdUtf8String::EqualsCaseSensitive)
+ QCFuncElement("EqualsCaseInsensitive", MdUtf8String::EqualsCaseInsensitive)
+ QCFuncElement("HashCaseInsensitive", MdUtf8String::HashCaseInsensitive)
FCFuncEnd()
FCFuncStart(gTypeNameBuilder)
#ifdef MDA_SUPPORTED
FCClassElement("Mda", "System", gMda)
#endif
+FCClassElement("MdUtf8String", "System", gMdUtf8String)
FCClassElement("MemoryFailPoint", "System.Runtime", gMemoryFailPointFuncs)
FCClassElement("MetadataImport", "System.Reflection", gMetaDataImport)
FCClassElement("MissingMemberException", "System", gMissingMemberExceptionFuncs)
#ifdef FEATURE_COMINTEROP
FCClassElement("UriMarshaler", "System.StubHelpers", gUriMarshalerFuncs)
#endif
-FCClassElement("Utf8String", "System", gUtf8String)
FCClassElement("ValueClassMarshaler", "System.StubHelpers", gValueClassMarshalerFuncs)
FCClassElement("ValueType", "System", gValueTypeFuncs)
#ifdef FEATURE_COMINTEROP
#include "invokeutil.h"
-FCIMPL3(FC_BOOL_RET, Utf8String::EqualsCaseSensitive, LPCUTF8 szLhs, LPCUTF8 szRhs, INT32 stringNumBytes)
+FCIMPL3(FC_BOOL_RET, MdUtf8String::EqualsCaseSensitive, LPCUTF8 szLhs, LPCUTF8 szRhs, INT32 stringNumBytes)
{
CONTRACTL {
FCALL_CHECK;
}
FCIMPLEND
-BOOL QCALLTYPE Utf8String::EqualsCaseInsensitive(LPCUTF8 szLhs, LPCUTF8 szRhs, INT32 stringNumBytes)
+BOOL QCALLTYPE MdUtf8String::EqualsCaseInsensitive(LPCUTF8 szLhs, LPCUTF8 szRhs, INT32 stringNumBytes)
{
QCALL_CONTRACT;
return fStringsEqual;
}
-ULONG QCALLTYPE Utf8String::HashCaseInsensitive(LPCUTF8 sz, INT32 stringNumBytes)
+ULONG QCALLTYPE MdUtf8String::HashCaseInsensitive(LPCUTF8 sz, INT32 stringNumBytes)
{
QCALL_CONTRACT;
INT32 m_localIndex;
};
-class Utf8String {
+class MdUtf8String {
public:
static FCDECL3(FC_BOOL_RET, EqualsCaseSensitive, LPCUTF8 szLhs, LPCUTF8 szRhs, INT32 stringNumBytes);