Пример #1
0
 /// <summary>
 /// Initializes a new instance of <c>MicroserviceApiController{TService}</c> class.
 /// </summary>
 /// <param name="configuration">The configuration instance of WeText application.</param>
 /// <param name="commandSender">The command sender instance.</param>
 /// <param name="tableGatewayRegistration">The table gateway registration.</param>
 protected MicroserviceApiController(WeTextConfiguration configuration,
                                     ICommandSender commandSender,
                                     IEnumerable <Lazy <ITableDataGateway, NamedMetadata> > tableGatewayRegistration)
 {
     this.configuration    = configuration;
     this.commandSender    = commandSender;
     this.tableDataGateway = tableGatewayRegistration.First(x => x.Metadata.Name == $"{typeof(TService).FullName}.TableDataGateway").Value;
 }
 public TextingServiceRegister(WeTextConfiguration configuration) : base(configuration)
 {
     this.tableDataGatewayConnectionString = ThisConfiguration?.Settings?.GetItemByKey("TableDataGatewayConnectionString").Value;
     if (string.IsNullOrEmpty(this.tableDataGatewayConnectionString))
     {
         throw new ServiceRegistrationException("Connection String for TableDataGateway has not been specified.");
     }
 }
Пример #3
0
 protected MicroserviceRegister(WeTextConfiguration configuration)
 {
     this.configuration = configuration;
 }
Пример #4
0
 public TextingController(WeTextConfiguration configuration,
                          ICommandSender commandSender,
                          IEnumerable <Lazy <ITableDataGateway, NamedMetadata> > tableGatewayRegistration)
     : base(configuration, commandSender, tableGatewayRegistration)
 {
 }