Find | Replace |
---|---|
IRequestHandler |
RequestHandler |
IAsyncRequestHandler |
AsyncRequestHandler |
ICancellableAsyncRequestHandler |
IRequestHandler |
INotificationHandler |
NotificationHandler |
IAsyncNotificationHandler |
AsyncNotificationHandler |
ICancellableNotificationRequestHandler |
INotificationHandler |
public async Task<([a-zA-Z0-9_<>]*)> Handle\(([a-zA-Z0-9_<>]*) ([a-zA-Z0-9_<>]*)\) |
protected override async Task<$1> HandleCore($2 $3) |
public Task<([a-zA-Z0-9_<>]*)> Handle\(([a-zA-Z0-9_<>]*) ([a-zA-Z0-9_<>]*)\) |
protected override Task<$1> HandleCore($2 $3) |
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 Append(dynamic viewModel, RouteData routeData, IQueryCollection query) | |
{ | |
var id = (string)routeData.Values["id"]; | |
var response = await new HttpClient().GetAsync(url); | |
dynamic shipment = await response.Content.AsExpandoAsync(); | |
viewModel.ShippingStatus = shipment.Status; | |
viewModel.ShippingCourier = shipment.Courier; |
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 Append(dynamic viewModel, RouteData routeData, IQueryCollection query) | |
{ | |
var id = (string)routeData.Values["id"]; | |
var response = await new HttpClient().GetAsync(url); | |
dynamic order = await response.Content.AsExpandoAsync(); | |
viewModel.OrderNumber = order.OrderNumber; | |
viewModel.OrderItemsCount = order.ItemsCount; |
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
[merge] | |
tool = p4merge | |
ff = no | |
[diff] | |
tool = p4merge | |
guitool = p4merge | |
renames = copies | |
[difftool] | |
prompt = false | |
[mergetool] |
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
(src, dest, ctxt) => | |
{ | |
When_mapping_from_ICollection_types_but_implementations_are_different.Dest typeMapDestination; | |
return (src == null) | |
? null | |
: { | |
typeMapDestination = dest ?? new When_mapping_from_ICollection_types_but_implementations_are_different.Dest(); | |
try | |
{ | |
var resolvedValue = ((src == null) || false) ? null : src.Items; |
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
void MapFrom<TSourceMember>(Expression<Func<TSource, TSourceMember>> sourceMember); | |
void ResolveUsing<TResult>(Func<TSource, TResult> resolver); | |
void ResolveUsing<TResult>(Func<TSource, TDestination, TResult> resolver); | |
void ResolveUsing<TResult>(Func<TSource, TDestination, TMember, TResult> resolver); | |
void ResolveUsing<TResult>(Func<TSource, TDestination, TMember, ResolutionContext, TResult> resolver); | |
// vs | |
void MapFrom<TResult>(Expression<Func<TSource, TResult>> sourceMember); | |
void MapFrom<TResult>(Func<TSource, TDestination, TResult> resolver); | |
void MapFrom<TResult>(Func<TSource, TDestination, TMember, TResult> resolver); |
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 AutoMapper; | |
public class Source { | |
public long? Value {get; set;} | |
} | |
public class Dest { | |
public long Value { 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
using System; | |
using System.Collections.Generic; | |
using AutoMapper; | |
public class TimesheetVinculado {} | |
public class Timesheet | |
{ | |
public virtual IList<TimesheetVinculado> TimesheetVinculadoFilhos { get; set; } | |
} |
For 1M iterations:
#Original
AutoMapper: - Flattening - Mapping time: 0.1861733s
Manual: - Flattening - Mapping time: 0.015219s
CtorMapper: - Ctors - Mapping time: 0.1554203s
ManualCtorMapper: - Ctors - Mapping time: 0.0054948s
Complex Types: - Complex - Mapping time: 3.5326011s
Manual Complex Types: - Complex - Mapping time: 0.9445706s
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
var host = A.Fake<IHostingEnvironment>(); | |
A.CallTo(() => host.ContentRootPath).Returns(Directory.GetCurrentDirectory()); | |
// DependencyContext.Default throws | |
FixEntryAssembly(); | |
// DependencyContext.Default does not throw! | |
var startup = new Startup(host); | |
_configuration = startup.Configuration; |