Skip to content

Instantly share code, notes, and snippets.

View SashaGolovach's full-sized avatar
🎯
Focusing on the impact

Oleksandr Holovach SashaGolovach

🎯
Focusing on the impact
View GitHub Profile
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@thiagomajesk
thiagomajesk / AutoFacModule.cs
Last active August 30, 2023 16:47
Generic Handlers & Commands for MediatR (+ AutoFac config)
public class GenericHandlersModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<CreateCommandHandler<Foo, CreateFooCommand>>().As<IRequestHandler<CreateFooCommand, bool>>();
builder.RegisterType<DeleteCommandHandler<Foo, DeleteFooCommand>>().As<IRequestHandler<DeleteFooCommand, bool>>();
builder.RegisterType<ListQueryHandler<Foo, ListFooQuery>>().As<IRequestHandler<ListFooQuery, IEnumerable<Foo>>>();
builder.RegisterType<UpdateCommandHandler<Foo, UpdateFooCommand>>().As<IRequestHandler<UpdateFooCommand, bool>>();
}
}