src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (35)
80void SetProperty(PropertyId id, void* data, uint size);
83int GetProperty(PropertyId id, void* data, ref uint size);
158internal static unsafe byte[] GetPropertyBytes(IAssemblyName nameObject, PropertyId propertyId)
187internal static unsafe string GetPropertyString(IAssemblyName nameObject, PropertyId propertyId)
201internal static unsafe bool IsKeyOrTokenEmpty(IAssemblyName nameObject, PropertyId propertyId)
203Debug.Assert(propertyId == PropertyId.NULL_PUBLIC_KEY_TOKEN || propertyId == PropertyId.NULL_PUBLIC_KEY);
224uint? major = GetPropertyWord(name, PropertyId.MAJOR_VERSION);
225uint? minor = GetPropertyWord(name, PropertyId.MINOR_VERSION);
226uint? build = GetPropertyWord(name, PropertyId.BUILD_NUMBER);
227uint? revision = GetPropertyWord(name, PropertyId.REVISION_NUMBER);
256byte[] result = GetPropertyBytes(nameObject, PropertyId.PUBLIC_KEY_TOKEN);
262if (IsKeyOrTokenEmpty(nameObject, PropertyId.NULL_PUBLIC_KEY_TOKEN))
272byte[] result = GetPropertyBytes(nameObject, PropertyId.PUBLIC_KEY);
278if (IsKeyOrTokenEmpty(nameObject, PropertyId.NULL_PUBLIC_KEY))
286internal static unsafe uint? GetPropertyWord(IAssemblyName nameObject, PropertyId propertyId)
306return GetPropertyString(nameObject, PropertyId.NAME);
311return GetPropertyString(nameObject, PropertyId.CULTURE);
316return (AssemblyContentType)(GetPropertyWord(nameObject, PropertyId.CONTENT_TYPE) ?? 0);
321return (ProcessorArchitecture)(GetPropertyWord(nameObject, PropertyId.ARCHITECTURE) ?? 0);
328uint retarget = GetPropertyWord(nameObject, PropertyId.RETARGET) ?? 0;
337private static unsafe void SetProperty(IAssemblyName nameObject, PropertyId propertyId, string data)
357private static unsafe void SetProperty(IAssemblyName nameObject, PropertyId propertyId, byte[] data)
372private static unsafe void SetProperty(IAssemblyName nameObject, PropertyId propertyId, ushort data)
377private static unsafe void SetProperty(IAssemblyName nameObject, PropertyId propertyId, uint data)
387nameObject.SetProperty(PropertyId.NULL_PUBLIC_KEY_TOKEN, null, 0);
391SetProperty(nameObject, PropertyId.PUBLIC_KEY_TOKEN, value);
453SetProperty(result, PropertyId.NAME, assemblyName);
458SetProperty(result, PropertyId.MAJOR_VERSION, unchecked((ushort)name.Version.Major));
459SetProperty(result, PropertyId.MINOR_VERSION, unchecked((ushort)name.Version.Minor));
460SetProperty(result, PropertyId.BUILD_NUMBER, unchecked((ushort)name.Version.Build));
461SetProperty(result, PropertyId.REVISION_NUMBER, unchecked((ushort)name.Version.Revision));
478SetProperty(result, PropertyId.CULTURE, cultureName);
483SetProperty(result, PropertyId.RETARGET, 1U);
488SetProperty(result, PropertyId.CONTENT_TYPE, (uint)name.ContentType);