Permalink
Browse files

improved the SessionStore

  • Loading branch information...
1 parent e0577e4 commit 17ec2cd27519d5c895f902b013b058721e5323b1 @Sedward Sedward committed Jun 3, 2010
Showing with 10 additions and 9 deletions.
  1. +10 −9 MongoSessionStore/SessionStore.cs
@@ -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},

0 comments on commit 17ec2cd

Please sign in to comment.