Exemplo n.º 1
0
 private static DayOffExclusion Convert(Guid id, DayOffExclusionInputContract dayOffExclusion)
 {
     if (dayOffExclusion == null)
     {
         throw new ArgumentNullException(nameof(dayOffExclusion));
     }
     return(new DayOffExclusion(id, dayOffExclusion.AssetPairRegex, dayOffExclusion.Start,
                                dayOffExclusion.End, dayOffExclusion.IsTradeEnabled));
 }
Exemplo n.º 2
0
 public Task <DayOffExclusionContract> UpdateExclusion(Guid id, [FromBody] DayOffExclusionInputContract contract)
 {
     return(Task.FromResult(Convert(_dayOffSettingsService.UpdateExclusion(Convert(id, contract)))));
 }
Exemplo n.º 3
0
 public Task <DayOffExclusionContract> CreateExclusion([FromBody] DayOffExclusionInputContract contract)
 {
     return(Task.FromResult(Convert(_dayOffSettingsService.CreateExclusion(Convert(Guid.NewGuid(), contract)))));
 }