Repository: ivanpaulovich/FluentMediator
Branch: master
Commit: 6f1c0a53d332
Files: 103
Total size: 142.2 KB
Directory structure:
gitextract_qjfzijxk/
├── .all-contributorsrc
├── .editorconfig
├── .gitignore
├── .vscode/
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── FluentMediator.sln
├── LICENSE
├── README.md
├── azure-pipelines-1.yml
├── azure-pipelines.yml
├── changelog.md
├── docs/
│ └── icon.xcf
├── samples/
│ ├── AspNetCore/
│ │ ├── .vscode/
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ │ ├── Wallet.sln
│ │ ├── src/
│ │ │ ├── Core/
│ │ │ │ ├── Core.csproj
│ │ │ │ ├── Services/
│ │ │ │ │ └── ICustomerRepository.cs
│ │ │ │ ├── UseCases/
│ │ │ │ │ ├── IRegisterUseCase.cs
│ │ │ │ │ ├── Register.cs
│ │ │ │ │ ├── RegisterCommand.cs
│ │ │ │ │ └── RegisterResponse.cs
│ │ │ │ └── Wallet/
│ │ │ │ └── Customer.cs
│ │ │ ├── Infrastructure/
│ │ │ │ ├── InMemory/
│ │ │ │ │ └── CustomerRepository.cs
│ │ │ │ └── Infrastructure.csproj
│ │ │ └── WebApi/
│ │ │ ├── Controllers/
│ │ │ │ └── Register/
│ │ │ │ ├── CustomersController.cs
│ │ │ │ └── RegisterRequest.cs
│ │ │ ├── Program.cs
│ │ │ ├── Startup.cs
│ │ │ ├── WebApi.csproj
│ │ │ ├── appsettings.Development.json
│ │ │ └── appsettings.json
│ │ └── test/
│ │ └── UnitTests/
│ │ ├── UnitTests.csproj
│ │ └── UseCasesTests/
│ │ └── RegisterTests.cs
│ └── SimpleConsoleApp/
│ ├── .vscode/
│ │ ├── launch.json
│ │ ├── settings.json
│ │ └── tasks.json
│ ├── PingPong/
│ │ ├── PingHandler.cs
│ │ ├── PingPong.csproj
│ │ ├── PingRequest.cs
│ │ └── Program.cs
│ └── Samples.sln
├── src/
│ ├── FluentMediator/
│ │ ├── FluentMediator.csproj
│ │ ├── GetService.cs
│ │ ├── IMediator.cs
│ │ ├── IPipelineProvider.cs
│ │ ├── IPipelineProviderBuilder.cs
│ │ ├── Mediator.cs
│ │ ├── MediatorException.cs
│ │ ├── NullRequestException.cs
│ │ ├── PipelineNotFoundEventArgs.cs
│ │ ├── PipelineProvider.cs
│ │ ├── PipelineProviderBuilder.cs
│ │ └── Pipelines/
│ │ ├── CancellablePipelineAsync/
│ │ │ ├── Direct.cs
│ │ │ ├── ICancellableMediator.cs
│ │ │ ├── ICancellablePipelineAsync.cs
│ │ │ ├── ICancellablePipelineAsyncBuilder.cs
│ │ │ ├── ICancellablePipelineProvider.cs
│ │ │ ├── ICancellablePipelineProviderBuilder.cs
│ │ │ ├── IDirect.cs
│ │ │ ├── Pipeline.cs
│ │ │ └── PipelineBuilder.cs
│ │ ├── IMethodCollection.cs
│ │ ├── INamedPipeline.cs
│ │ ├── IPipelineBehavior.cs
│ │ ├── IPipelineCollection.cs
│ │ ├── ITypedPipeline.cs
│ │ ├── Method.cs
│ │ ├── MethodCollection.cs
│ │ ├── Pipeline/
│ │ │ ├── Direct.cs
│ │ │ ├── IDirect.cs
│ │ │ ├── IPipeline.cs
│ │ │ ├── IPipelineBuilder.cs
│ │ │ ├── ISyncMediator.cs
│ │ │ ├── ISyncPipelineProvider.cs
│ │ │ ├── ISyncPipelineProviderBuilder.cs
│ │ │ ├── Pipeline.cs
│ │ │ └── PipelineBuilder.cs
│ │ ├── PipelineAlreadyExistsException.cs
│ │ ├── PipelineAsync/
│ │ │ ├── Direct.cs
│ │ │ ├── IAsyncMediator.cs
│ │ │ ├── IAsyncPipelineProvider.cs
│ │ │ ├── IAsyncPipelineProviderBuilder.cs
│ │ │ ├── IDirect.cs
│ │ │ ├── IPipelineAsync.cs
│ │ │ ├── IPipelineAsyncBuilder.cs
│ │ │ ├── Pipeline.cs
│ │ │ └── PipelineBuilder.cs
│ │ ├── PipelineBehavior.cs
│ │ ├── PipelineCollection.cs
│ │ ├── PipelineNotFoundException.cs
│ │ └── ReturnFunctionIsNullException.cs
│ └── FluentMediator.Microsoft.Extensions.DependencyInjection/
│ ├── FluentMediator.Microsoft.Extensions.DependencyInjection.csproj
│ └── FluentMediatorExtensions.cs
└── test/
└── UnitTests/
├── BuildingMediatorTests.cs
├── MyCustomMediator.cs
├── PingPong/
│ ├── IPingHandler.cs
│ ├── PingHandler.cs
│ ├── PingRequest.cs
│ └── PingResponse.cs
├── PublishingRequestsTests.cs
├── SendingRequestTests.cs
└── UnitTests.csproj
================================================
FILE CONTENTS
================================================
================================================
FILE: .all-contributorsrc
================================================
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "ivanpaulovich",
"name": "Ivan Paulovich",
"avatar_url": "https://avatars3.githubusercontent.com/u/7133698?v=4",
"profile": "https://paulovich.net",
"contributions": [
"code",
"design",
"test"
]
},
{
"login": "joacar",
"name": "Joakim Carselind",
"avatar_url": "https://avatars1.githubusercontent.com/u/439028?v=4",
"profile": "http://www.carselind.se",
"contributions": [
"review",
"ideas"
]
},
{
"login": "vag1830",
"name": "Vaggelis Mparmpas",
"avatar_url": "https://avatars2.githubusercontent.com/u/1694870?v=4",
"profile": "https://github.com/vag1830",
"contributions": [
"test"
]
}
],
"contributorsPerLine": 7,
"projectName": "FluentMediator",
"projectOwner": "ivanpaulovich",
"repoType": "github",
"repoHost": "https://github.com"
}
================================================
FILE: .editorconfig
================================================
# editorconfig.org
# top-most EditorConfig file
root = true
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[project.json]
indent_size = 2
# C# files
[*.cs]
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# Types: use keywords instead of BCL types, and permit var only when the type is clear
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = false:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# static fields should have s_ prefix
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
dotnet_naming_style.static_prefix_style.required_prefix = s_
dotnet_naming_style.static_prefix_style.capitalization = camel_case
# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Code style defaults
csharp_using_directive_placement = outside_namespace:suggestion
dotnet_sort_system_directives_first = true
csharp_prefer_braces = true:refactoring
csharp_preserve_single_line_blocks = true:none
csharp_preserve_single_line_statements = false:none
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_simple_using_statement = false:none
csharp_style_prefer_switch_expression = true:suggestion
# Code quality
dotnet_style_readonly_field = true:suggestion
dotnet_code_quality_unused_parameters = non_public:suggestion
# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:refactoring
dotnet_style_prefer_conditional_expression_over_return = true:refactoring
csharp_prefer_simple_default_expression = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_methods = true:refactoring
csharp_style_expression_bodied_constructors = true:refactoring
csharp_style_expression_bodied_operators = true:refactoring
csharp_style_expression_bodied_properties = true:refactoring
csharp_style_expression_bodied_indexers = true:refactoring
csharp_style_expression_bodied_accessors = true:refactoring
csharp_style_expression_bodied_lambdas = true:refactoring
csharp_style_expression_bodied_local_functions = true:refactoring
# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Other features
csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
csharp_style_pattern_local_over_anonymous_function = false:none
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Analyzers
dotnet_code_quality.ca1802.api_surface = private, internal
# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
indent_brace_style = Allman
# Xml project files
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2
# Xml build files
[*.builds]
indent_size = 2
# Xml files
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2
# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2
# Shell scripts
[*.sh]
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
.DS_Store
================================================
FILE: .vscode/launch.json
================================================
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/test/UnitTests/bin/Debug/netcoreapp3.0/UnitTests.dll",
"args": [],
"cwd": "${workspaceFolder}/test/UnitTests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"workbench.colorCustomizations": {
"activityBar.background": "#2f7c47",
"activityBar.activeBorder": "#422c74",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#422c74",
"activityBarBadge.foreground": "#e7e7e7",
"titleBar.activeBackground": "#215732",
"titleBar.inactiveBackground": "#21573299",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799",
"statusBar.background": "#215732",
"statusBarItem.hoverBackground": "#2f7c47",
"statusBar.foreground": "#e7e7e7"
},
"peacock.color": "#215732"
}
================================================
FILE: .vscode/tasks.json
================================================
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/test/UnitTests/UnitTests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/test/UnitTests/UnitTests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/test/UnitTests/UnitTests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
================================================
FILE: FluentMediator.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2F50D282-F726-49F8-87B7-5662493EDBCA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentMediator", "src\FluentMediator\FluentMediator.csproj", "{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{62742B03-49D2-429F-A928-3E6DCA724943}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentMediator.Microsoft.Extensions.DependencyInjection", "src\FluentMediator.Microsoft.Extensions.DependencyInjection\FluentMediator.Microsoft.Extensions.DependencyInjection.csproj", "{2E365BC8-38CB-4FAD-B186-85F053B2D53F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x64.ActiveCfg = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x64.Build.0 = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x86.ActiveCfg = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x86.Build.0 = Debug|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|Any CPU.Build.0 = Release|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x64.ActiveCfg = Release|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x64.Build.0 = Release|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x86.ActiveCfg = Release|Any CPU
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x86.Build.0 = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x64.Build.0 = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x86.Build.0 = Debug|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|Any CPU.Build.0 = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x64.ActiveCfg = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x64.Build.0 = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x86.ActiveCfg = Release|Any CPU
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x86.Build.0 = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x64.ActiveCfg = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x64.Build.0 = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x86.ActiveCfg = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x86.Build.0 = Debug|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|Any CPU.Build.0 = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x64.ActiveCfg = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x64.Build.0 = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x86.ActiveCfg = Release|Any CPU
{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{21CE6BEA-C0A5-4676-A56A-7574E1373A0E} = {2F50D282-F726-49F8-87B7-5662493EDBCA}
{3F9FB7FC-68CA-451D-9828-323F20FB3DB7} = {62742B03-49D2-429F-A928-3E6DCA724943}
{2E365BC8-38CB-4FAD-B186-85F053B2D53F} = {2F50D282-F726-49F8-87B7-5662493EDBCA}
EndGlobalSection
EndGlobal
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# FluentMediator
[](https://ivanpaulovich.visualstudio.com/FluentMediator/_build/latest?definitionId=24&branchName=master) [](#contributors)   
:twisted_rightwards_arrows: We will not require you to add dependencies into your domain or to implement frameworks interfaces in your event handlers. Finally a really loosely coupled mediator library was born.
## Install
```
Install-Package FluentMediator
```
For seameless .NET Core integration:
```
Install-Package FluentMediator.Microsoft.Extensions.DependencyInjection
```
## How
Setup your events and pipelines using depedency injection. You can be very creative here! It supports async methods and cancellable tokens parameters, you could append multiple steps select one to return a message. An example:
```c#
services.AddFluentMediator(builder => {
builder.On().Pipeline()
.Call((handler, request) => handler.MyMethod(request))
.Call((handler, request) => handler.MyLongMethod(request))
.Return(
(handler, request) => handler.MyOtherMethod(request)
);
});
```
Then you are able to use the injected `IMediator` interface.
### Publishing Events
```c#
// Puts the message in the pipeline, calls three handlers.
mediator.Publish(ping);
```
### Sending Commands and Queries
```c#
// Calls the three handlers then get the response from `MyOtherMethod(PingRequest)`.
PingResponse response = mediator.Send(new PingRequest("Ping"));
Console.WriteLine(response.Message); // Prints "Pong"
```
## Why
When designing *CQRS* or *Event-Driven* applications we need to publish events from the infrastructure layer into the *domain event handlers*. We do not want framework dependencies leaking out to the Model then **FluentMediator** was born.
## Contributors