public byte[] GetData() { SessionSerializer serializer = new SessionSerializer(); serializer.Serialize(m_packet); return(serializer.GetSerializedData()); }
private void GetCurrentRecords(Action <IList <NotifyRecord> > action) { if (this.session == null) { return; } lock (this.session.Id) { var collection = SessionSerializer.Deserialize <List <NotifyRecord> >( this.session.GetString(NotificationMessagesSessionKey)) ?? new List <NotifyRecord>(); action(collection); this.session.SetString(NotificationMessagesSessionKey, SessionSerializer.Serialize(collection)); } }
protected override byte[] SerializeSession(object sessionData) { NCacheSessionData session = sessionData as NCacheSessionData; return(SessionSerializer.Serialize(session)); }