AppHarbor.Web.Security.AuthenticationCookie.AuthenticationCookie C# (CSharp) Method

AuthenticationCookie() private method

private AuthenticationCookie ( byte data ) : System
data byte
return System
		private AuthenticationCookie(byte[] data)
		{
			using (var memoryStream = new MemoryStream(data))
			{
				using (var binaryReader = new BinaryReader(memoryStream))
				{
					_cookieType = binaryReader.ReadInt16();
					_id = new Guid(binaryReader.ReadBytes(16));
					_persistent = binaryReader.ReadBoolean();
					_issueDate = DateTime.FromBinary(binaryReader.ReadInt64());
					var identityLength = binaryReader.ReadInt32();
					var identityBytes = binaryReader.ReadBytes(identityLength);
					var stream = new MemoryStream(identityBytes);
					var formatter = new BinaryFormatter();
					_identity = (ClaimsIdentity)formatter.Deserialize(stream);
				}
			}
		}

Same methods

AuthenticationCookie::AuthenticationCookie ( short cookieType, System.Guid id, bool persistent, ClaimsIdentity identity ) : System