public static void ApplyProjection(TypeReference type, TypeReferenceProjection projection)
{
if (projection == null)
return;
switch (projection.Treatment)
{
case TypeReferenceTreatment.SystemDelegate:
case TypeReferenceTreatment.SystemAttribute:
type.Scope = type.Module.Projections.GetAssemblyReference ("System.Runtime");
break;
case TypeReferenceTreatment.UseProjectionInfo:
var info = Projections [type.Name];
type.Name = info.ClrName;
type.Namespace = info.ClrNamespace;
type.Scope = type.Module.Projections.GetAssemblyReference (info.ClrAssembly);
break;
}
type.WindowsRuntimeProjection = projection;
}