private static IControllerFactory CreateControllerFactory()
 {
     string assemblyName = ConfigurationManager.AppSettings["chirpRepositoryAssemblyName"];
     string typeName = ConfigurationManager.AppSettings["chirpRepositoryTypeName"];
     string databaseName = ConfigurationManager.AppSettings["databaseName"];
     DocumentStore documentStore = new DocumentStore();
     documentStore.ConnectionStringName = "RavenDB";
     documentStore.Initialize();
     documentStore.DatabaseCommands.EnsureDatabaseExists(databaseName);
     //var cacheRepository = Activator.CreateInstance(Type.GetType(typeName, true, true), new object[] {
     //    documentStore, databaseName
     //});
     var controllerFactory = new MeetingControllerFactory(documentStore);
     return controllerFactory;
 }
Exemple #2
0
        private static IControllerFactory CreateControllerFactory()
        {
            string        assemblyName  = ConfigurationManager.AppSettings["chirpRepositoryAssemblyName"];
            string        typeName      = ConfigurationManager.AppSettings["chirpRepositoryTypeName"];
            string        databaseName  = ConfigurationManager.AppSettings["databaseName"];
            DocumentStore documentStore = new DocumentStore();

            documentStore.ConnectionStringName = "RavenDB";
            documentStore.Initialize();
            documentStore.DatabaseCommands.EnsureDatabaseExists(databaseName);
            //var cacheRepository = Activator.CreateInstance(Type.GetType(typeName, true, true), new object[] {
            //    documentStore, databaseName
            //});
            var controllerFactory = new MeetingControllerFactory(documentStore);

            return(controllerFactory);
        }