Ejemplo n.º 1
0
        public static void ApplyProjection(FieldDefinition field, FieldDefinitionProjection projection)
        {
            if (projection == null)
            {
                return;
            }

            if (projection.Treatment == FieldDefinitionTreatment.Public)
            {
                field.Attributes = (field.Attributes & ~FieldAttributes.FieldAccessMask) | FieldAttributes.Public;
            }

            field.WindowsRuntimeProjection = projection;
        }
Ejemplo n.º 2
0
        public static FieldDefinitionProjection RemoveProjection(FieldDefinition field)
        {
            if (!field.IsWindowsRuntimeProjection)
            {
                return(null);
            }

            FieldDefinitionProjection projection = field.WindowsRuntimeProjection;

            field.WindowsRuntimeProjection = null;

            field.Attributes = projection.Attributes;

            return(projection);
        }