Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
improved the SessionStore
Browse files Browse the repository at this point in the history
  • Loading branch information
Sedward committed Jun 3, 2010
1 parent e0577e4 commit 17ec2cd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions MongoSessionStore/SessionStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ public static SessionStore Instance
{
get
{
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
instance = new SessionStore();
}
}
return instance;
return SessionStoreInternal.Instance;
}

}

internal class SessionStoreInternal
{
internal static readonly SessionStore Instance = new SessionStore();

static SessionStoreInternal() { }
}



public void Insert(Session session)
{
Document newSession = new Document() { { "SessionId",session.SessionID }, {"ApplicationName",session.ApplicationName},{"Created",session.Created},
Expand Down

0 comments on commit 17ec2cd

Please sign in to comment.