[sgen] Untag the vtable during concurrent mark
[mono.git] / mcs / class / System.Web / System.Web.Security / FormsAuthenticationTicket.cs
index cb108d98c40cb55e33d4861860af6a31d3ac6577..5adad7863bb14a5cf00698c61b9a2e0b4ca22e53 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.IO;
+using System.Security.Permissions;
 
 namespace System.Web.Security
 {
+       // CAS - no InheritanceDemand here as the class is sealed
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Serializable]
        public sealed class FormsAuthenticationTicket
        {
@@ -84,6 +87,9 @@ namespace System.Web.Security
 
                internal static FormsAuthenticationTicket FromByteArray (byte [] bytes)
                {
+                       if (bytes == null)
+                               throw new ArgumentNullException ("bytes");
+                       
                        MemoryStream ms = new MemoryStream (bytes);
                        BinaryReader reader = new BinaryReader (ms);
                        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket ();
@@ -103,7 +109,7 @@ namespace System.Web.Security
                        return ticket;
                }
 
-               private FormsAuthenticationTicket ()
+               FormsAuthenticationTicket ()
                {
                }