MongoServices 0.2.0
A Service/Repository Framework for mongoDB
C:/Development/MongoServices/Source/MongoServices/Configuration/RepositoryConfigContainer.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 RepositoryConfigContainer<TRepo, TModel>
00010                 where TRepo : MongoServicesRepository<TModel>
00011                 where TModel: MongoServicesModel
00012         {
00013                 #region Nested Singleton
00014                 class Nested
00015                 {
00016                         // Explicit static constructor to tell C# compiler
00017                         // not to mark type as beforefieldinit
00018                         static Nested()
00019                         {
00020                         }
00021 
00022                         internal static readonly RepositoryConfigContainer<TRepo, TModel> instance = new RepositoryConfigContainer<TRepo, TModel>();
00023                 }
00024 
00025                 public static RepositoryConfigContainer<TRepo, TModel> Instance
00026                 {
00027                         get
00028                         {
00029                                 return Nested.instance;
00030                         }
00031                 }
00032                 #endregion
00033 
00034                 #region MongoUrlProvider
00035                 public Func<MongoUrl> MongoUrlProvider { get; set; }
00036                 #endregion
00037         }
00038 }
 All Classes Namespaces Files Functions Enumerations Properties