public XamlLoadPermission(System.Xaml.Permissions.XamlAccessLevel allowedAccess)
 {
 }
 public bool Includes(System.Xaml.Permissions.XamlAccessLevel requestedAccess)
 {
     throw null;
 }
Ejemplo n.º 3
0
        /// <summary/>
        public static void Transform(System.Xaml.XamlReader reader, System.Xaml.XamlWriter writer, System.Xaml.Permissions.XamlAccessLevel accessLevel, bool requestReflectionPermission)
        {
            if (requestReflectionPermission)
            {
                System.Security.PermissionSet permissions = new System.Security.PermissionSet(System.Security.Permissions.PermissionState.None);
                permissions.AddPermission(new System.Xaml.Permissions.XamlLoadPermission(accessLevel));
                permissions.AddPermission(new System.Security.Permissions.ReflectionPermission(System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess));
                permissions.Assert();
            }
            else
            {
                new System.Xaml.Permissions.XamlLoadPermission(accessLevel).Assert();
            }

            System.Xaml.XamlServices.Transform(reader, writer);
        }