Mono.Cecil.WindowsRuntimeProjections.ApplyProjection C# (CSharp) Method

ApplyProjection() public static method

public static ApplyProjection ( TypeReference type, TypeReferenceProjection projection ) : void
type TypeReference
projection TypeReferenceProjection
return void
        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;
        }

Same methods

WindowsRuntimeProjections::ApplyProjection ( CustomAttribute attribute, CustomAttributeValueProjection projection ) : void
WindowsRuntimeProjections::ApplyProjection ( FieldDefinition field, FieldDefinitionProjection projection ) : void
WindowsRuntimeProjections::ApplyProjection ( Mono.Cecil.MethodDefinition method, MethodDefinitionProjection projection ) : void
WindowsRuntimeProjections::ApplyProjection ( Mono.Cecil.TypeDefinition type, TypeDefinitionProjection projection ) : void