Esempio n. 1
0
        internal void CheckSecurity(ParseRecord pr)
        {
            Type pRdtType = pr.PRdtType;

            if ((pRdtType != null) && this.IsRemoting)
            {
                if (typeof(MarshalByRefObject).IsAssignableFrom(pRdtType))
                {
                    throw new ArgumentException(Environment.GetResourceString("Serialization_MBRAsMBV", new object[] { pRdtType.FullName }));
                }
                FormatterServices.CheckTypeSecurity(pRdtType, this.formatterEnums.FEsecurityLevel);
            }
        }
 public void CheckTypeSecurity_Nop()
 {
     FormatterServices.CheckTypeSecurity(typeof(int), TypeFilterLevel.Full);
     FormatterServices.CheckTypeSecurity(typeof(int), TypeFilterLevel.Low);
 }