This file contains 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 MyModel { | |
public string Prop1 { get; set; } | |
public string Prop2 { get; set; } | |
[DataType.Date] | |
public string Prop3 { get; set; } |
This file contains 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
{ | |
"data": { | |
"mobile_numbers": [ | |
{ "number": "+44 (0)07779288893" }, | |
{ "number": "+44 (0)07779288893" } | |
], | |
"email_addresses": [ | |
{"address":"[email protected]"}, | |
{"address":"[email protected]"} |
This file contains 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
using FluentValidation; | |
using FluentValidation.Results; | |
using Vanquis.Digital.Services.WebAPI.Requests; | |
using Microsoft.Extensions.Options; | |
using Vanquis.Digital.Services.WebAPI.Helper; | |
namespace Vanquis.Digital.Services.WebAPI.ModelValidators | |
{ | |
public class TransactionRequestValidator : AbstractValidator<TransactionsRequest> | |
{ |
This file contains 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 async Task Invoke(HttpContext context) | |
{ | |
var stopWatch = new Stopwatch(); | |
stopWatch.Start(); | |
context.Response.OnStarting(_ => | |
{ | |
((HttpContext)_).Response.Headers["X-Instrumentation-Time-Elapsed-Ms"] = stopWatch.ElapsedMilliseconds.ToString(); | |
return Task.FromResult(0); | |
}, context); |
This file contains 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
//ImportSessionContext? | |
public class ImportSession : IImportSession | |
{ | |
private readonly IImportSessionRepository _importSessionRepository; | |
public ImportSession(IImportSessionRepository importSessionRepository) | |
{ | |
_importSessionRepository = importSessionRepository; | |
} |
This file contains 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 void SendTemplate(/* to decide: TemplateId, Parameters */) | |
{ | |
/* | |
- Get any flow with this template (Flow name, Flow Parameters) | |
- Get FlowOrderId of template on Flow | |
- Update Flow parameter values with parameters passed by user | |
- Update special parameters (email, sms) | |
- CreateSchedule | |
- Send Schedule for particular template |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Vanquis.Services.Communication.Contracts.ServiceContracts | |
{ | |
//Templates | |
public interface ITemplateService |
This file contains 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
ProspectBasedUserAuthenticationService | |
2) Injection of dependency IUserAuthenticationService into parameter authenticationService of constructor of type UsersController | |
1) Request for UsersController | |
Suggestions: |
This file contains 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 static IMappingExpression<TSource, TDestination> IgnoreAllNonExisting<TSource, TDestination>(this IMappingExpression<TSource, TDestination> expression) | |
{ | |
var sourceType = typeof(TSource); | |
var destinationType = typeof(TDestination); | |
var existingMaps = Mapper.GetAllTypeMaps(); | |
var first = existingMaps.First(x => x.SourceType == sourceType && x.DestinationType == destinationType); | |
foreach (var property in first.GetUnmappedPropertyNames()) | |
{ |
This file contains 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
namespace Vanquis.NewBusiness.Loans.Services.Tests.Utils | |
{ | |
public class ExpectArugmentNullExceptionAttribute : ExpectedExceptionAttribute | |
{ | |
public ExpectArugmentNullExceptionAttribute(string message) | |
: base(typeof(ArgumentNullException)) | |
{ | |
ExpectedMessage = message; | |
MatchType = MessageMatch.Contains; |
NewerOlder