示例#1
0
 public NewsController(INewsStorage newsStorage, NewsBuilder newsBuilder, CommentBuilder commentBuilder, ICommentStorage commentStorage)
 {
     _newsStorage    = newsStorage;
     _newsBuilder    = newsBuilder;
     _commentBuilder = commentBuilder;
     _commentStorage = commentStorage;
 }
示例#2
0
 protected ByDisciplinesNotification(
     IByDisciplinesNotifiable notifiable,
     IDataContext context,
     INewsStorage <T> newsStorage)
 {
     this.notifiable  = notifiable;
     this.context     = context;
     this.newsStorage = newsStorage;
 }
示例#3
0
        public HotNewsCreator()
        {
            string storageConnectionString = ConfigurationManager.AppSettings["StorageConnectionString"];

            string newsTableName    = ConfigurationManager.AppSettings["NewsTableName"];
            string hotNewsTableName = ConfigurationManager.AppSettings["HotNewsTableName"];

            this.newsStorage    = new NewsTableStorage(storageConnectionString, newsTableName);
            this.hotNewsStorage = new NewsTableStorage(storageConnectionString, hotNewsTableName);
        }
示例#4
0
		public RssParserService(ILogger logger,
								IConfigurationService configurationService,
								INewsStorage newsStorage,
								ObjectCache cache)
		{
			_logger = logger;
			_cache = cache;
			_configurationService = configurationService;
			_newsStorage = newsStorage;
		}
示例#5
0
        public void TestInitialize()
        {
            this.webService = WebApp.Start <Startup>("http://*:80/");
            this.goClient   = new GOClient(@"http://localhost/", "Alberto", "1234");

            string connectionString = ConfigurationManager.AppSettings["StorageConnectionString"];
            string userTable        = ConfigurationManager.AppSettings["UserTableName"];
            string newsTable        = ConfigurationManager.AppSettings["NewsTableName"];

            this.userStorage = new UserTableStorage(connectionString, userTable);
            this.newsStorage = new NewsTableStorage(connectionString, newsTable);

            this.goClient.CreateUser(userClient).Wait();
        }
示例#6
0
        public void TestInitialize()
        {
            string frontendEndpoint = ConfigurationManager.AppSettings["FrontendTestEndpoint"];

            this.goClient = new GOClient(frontendEndpoint, "Alberto", "1234");

            string connectionString = ConfigurationManager.AppSettings["StorageConnectionString"];
            string userTable        = ConfigurationManager.AppSettings["UserTableName"];
            string newsTable        = ConfigurationManager.AppSettings["NewsTableName"];

            this.userStorage = new UserTableStorage(connectionString, userTable);
            this.newsStorage = new NewsTableStorage(connectionString, newsTable);

            this.goClient.CreateUser(userClient).Wait();
        }
示例#7
0
 private void RenewFactory()
 {
     if (fakeChannel != null)
     {
         return;
     }
     try
     {
         if (factory != null)
         {
             factory.Abort();
         }
         factory = new ChannelFactory <INewsStorage>(endpointName);
         channel = factory.CreateChannel();
     }
     catch (Exception)
     {
         Logger.Error("NewsStorageProxy: невозможно создать прокси");
         channel = null;
     }
 }
示例#8
0
 public NewsBuilder(INewsRepository newsRepository, INewsStorage newsStorage)
 {
     _newsRepository = newsRepository;
     _newsStorage    = newsStorage;
 }
示例#9
0
 public NewsController(INewsStorage newsStorage, NewsBuilder newsBuilder)
 {
     _newsStorage = newsStorage;
     _newsBuilder = newsBuilder;
 }
示例#10
0
 private void RenewFactory()
 {
     if (fakeChannel != null) return;
     try
     {
         if (factory != null) factory.Abort();
         factory = new ChannelFactory<INewsStorage>(endpointName);
         channel = factory.CreateChannel();
     }
     catch (Exception)
     {
         Logger.Error("NewsStorageProxy: невозможно создать прокси");
         channel = null;
     }
 }
示例#11
0
 public FileController(IFileStorage repo, IUserRepository users, INewsStorage news)
 {
     repository = repo;
     Users      = users;
     News       = news;
 }
示例#12
0
 public NewsLetterService(INewsStorage storage)
 {
     this.newsStorage = storage;
 }
示例#13
0
 public NewsController(INewsStorage news, IFileStorage files, IHostingEnvironment env)
 {
     News        = news;
     Files       = files;
     environment = env;
 }
示例#14
0
 public HomeController(INewsStorage news)
 {
     News = news;
 }