MongoServices 0.2.0
A Service/Repository Framework for mongoDB
C:/Development/MongoServices/Source/MongoServices/Configuration/ModelConfigContainer.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Linq;
00004 using System.Text;
00005 using MongoDB.Driver;
00006 
00007 namespace MongoServices
00008 {
00009         internal sealed class ModelConfigContainer<T>
00010                 where T : MongoServicesModel
00011         {
00012                 #region Nested Singleton
00013                 class Nested
00014                 {
00015                         // Explicit static constructor to tell C# compiler
00016                         // not to mark type as beforefieldinit
00017                         static Nested()
00018                         {
00019                         }
00020 
00021                         internal static readonly ModelConfigContainer<T> instance = new ModelConfigContainer<T>();
00022                 }
00023 
00024                 public static ModelConfigContainer<T> Instance
00025                 {
00026                         get
00027                         {
00028                                 return Nested.instance;
00029                         }
00030                 }
00031                 #endregion
00032         }
00033 }
 All Classes Namespaces Files Functions Enumerations Properties