This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class SearchRediSWorkerHandler | |
| : WorkerHandler<SearchRediSRequest, SearchRediSResponse> | |
| { | |
| private readonly IConfiguration _configuration; | |
| public SearchRediSWorkerHandler( | |
| IMapper mapper, | |
| ILifetimeScope scope, | |
| IConfiguration configuration, | |
| IWorkerContext<SearchRediSResponse> context) | |
| : base(mapper, scope, context) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @inject IMapper Mapper | |
| @inject ApiPostController ApiPostController | |
| @inject IApplicationContextHandler ApplicationContextHandler | |
| @inherits KudoCodePageComponent | |
| <div class="row"> | |
| <div class="col-8"> | |
| <KudoCodeTextBox Id="Search" | |
| Placeholder="Search" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class CompanySavedEventHandler : EventHandler<CompanySavedEvent> | |
| { | |
| private ApiPostController _apiPostController; | |
| private readonly IMapper _mapper; | |
| public CompanySavedEventHandler(ApiPostController apiPostController, IMapper mapper) | |
| { | |
| _apiPostController = apiPostController; | |
| _mapper = mapper; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class SaveCompanyWorkerHandler : CommandHandler<SaveCompanyRequest, | |
| Company, SaveCompanyResponse> | |
| { | |
| public SaveCompanyWorkerHandler( | |
| IMapper mapper, | |
| IRepository repository, | |
| ILifetimeScope scope, | |
| IWorkerContext<SaveCompanyResponse> context) | |
| : base(mapper, repository, scope, context) | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @inject IMapper Mapper | |
| @inject ApiPostController ApiPostController | |
| @inject IApplicationContextHandler ApplicationContextHandler | |
| @inherits KudoCodePageComponent | |
| @{var colLabelText = new int[] { 3, 9 };} | |
| <KudoCodeTextBox Id="Name" | |
| Title="Name:" | |
| ColSize="@colLabelText" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class SwapCasing | |
| { | |
| public string Swap(string key, string message) | |
| { | |
| return key.Equals(key.ToUpper()) | |
| ? message.ToUpper() | |
| : message.ToLower(); | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class ToDoTask_v4 | |
| { | |
| public static IContainer Container { get; set; } | |
| public ToDoTask_v4() | |
| { | |
| var builder = new ContainerBuilder(); | |
| builder.RegisterType<SelectedN>().Keyed<IStrategy>("N"); | |
| builder.RegisterType<SelectedY>().Keyed<IStrategy>("Y"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public interface IStrategy | |
| { | |
| string Do(string key); | |
| } | |
| public class SelectedN : IStrategy | |
| { | |
| public string Do(string key) | |
| { | |
| var message = "You selected N"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class ToDoTask_v2 | |
| { | |
| public string Do(string key) | |
| { | |
| if (key.Equals("Y")) | |
| { | |
| var message = "You selected Y"; | |
| return key.Equals(key.ToUpper()) | |
| ? message.ToUpper() | |
| : message.ToLower(); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class ToDoTask_v1 | |
| { | |
| public string Do(string key) | |
| { | |
| if (key.Equals("N")) | |
| return "You selected N"; | |
| if (key.Equals("Y")) | |
| return "You selected Y"; | |
| return "Incorrect Selection"; | 
NewerOlder