[
  {
    "path": ".all-contributorsrc",
    "content": "{\n  \"files\": [\n    \"README.md\"\n  ],\n  \"imageSize\": 100,\n  \"commit\": false,\n  \"contributors\": [\n    {\n      \"login\": \"ivanpaulovich\",\n      \"name\": \"Ivan Paulovich\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/7133698?v=4\",\n      \"profile\": \"https://paulovich.net\",\n      \"contributions\": [\n        \"code\",\n        \"design\",\n        \"test\"\n      ]\n    },\n    {\n      \"login\": \"joacar\",\n      \"name\": \"Joakim Carselind\",\n      \"avatar_url\": \"https://avatars1.githubusercontent.com/u/439028?v=4\",\n      \"profile\": \"http://www.carselind.se\",\n      \"contributions\": [\n        \"review\",\n        \"ideas\"\n      ]\n    },\n    {\n      \"login\": \"vag1830\",\n      \"name\": \"Vaggelis Mparmpas\",\n      \"avatar_url\": \"https://avatars2.githubusercontent.com/u/1694870?v=4\",\n      \"profile\": \"https://github.com/vag1830\",\n      \"contributions\": [\n        \"test\"\n      ]\n    }\n  ],\n  \"contributorsPerLine\": 7,\n  \"projectName\": \"FluentMediator\",\n  \"projectOwner\": \"ivanpaulovich\",\n  \"repoType\": \"github\",\n  \"repoHost\": \"https://github.com\"\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "# editorconfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Default settings:\n# A newline ending every file\n# Use 4 spaces as indentation\n[*]\ninsert_final_newline = true\nindent_style = space\nindent_size = 4\ntrim_trailing_whitespace = true\n\n[project.json]\nindent_size = 2\n\n# C# files\n[*.cs]\n# New line preferences\ncsharp_new_line_before_open_brace = all\ncsharp_new_line_before_else = true\ncsharp_new_line_before_catch = true\ncsharp_new_line_before_finally = true\ncsharp_new_line_before_members_in_object_initializers = true\ncsharp_new_line_before_members_in_anonymous_types = true\ncsharp_new_line_between_query_expression_clauses = true\n\n# Indentation preferences\ncsharp_indent_block_contents = true\ncsharp_indent_braces = false\ncsharp_indent_case_contents = true\ncsharp_indent_case_contents_when_block = true\ncsharp_indent_switch_labels = true\ncsharp_indent_labels = one_less_than_current\n\n# Modifier preferences\ncsharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion\n\n# avoid this. unless absolutely necessary\ndotnet_style_qualification_for_field = false:suggestion\ndotnet_style_qualification_for_property = false:suggestion\ndotnet_style_qualification_for_method = false:suggestion\ndotnet_style_qualification_for_event = false:suggestion\n\n# Types: use keywords instead of BCL types, and permit var only when the type is clear\ncsharp_style_var_for_built_in_types = false:suggestion\ncsharp_style_var_when_type_is_apparent = false:none\ncsharp_style_var_elsewhere = false:suggestion\ndotnet_style_predefined_type_for_locals_parameters_members = true:suggestion\ndotnet_style_predefined_type_for_member_access = true:suggestion\n\n# name all constant fields using PascalCase\ndotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion\ndotnet_naming_rule.constant_fields_should_be_pascal_case.symbols  = constant_fields\ndotnet_naming_rule.constant_fields_should_be_pascal_case.style    = pascal_case_style\ndotnet_naming_symbols.constant_fields.applicable_kinds   = field\ndotnet_naming_symbols.constant_fields.required_modifiers = const\ndotnet_naming_style.pascal_case_style.capitalization = pascal_case\n\n# static fields should have s_ prefix\ndotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion\ndotnet_naming_rule.static_fields_should_have_prefix.symbols  = static_fields\ndotnet_naming_rule.static_fields_should_have_prefix.style    = static_prefix_style\ndotnet_naming_symbols.static_fields.applicable_kinds   = field\ndotnet_naming_symbols.static_fields.required_modifiers = static\ndotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected\ndotnet_naming_style.static_prefix_style.required_prefix = s_\ndotnet_naming_style.static_prefix_style.capitalization = camel_case \n\n# internal and private fields should be _camelCase\ndotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion\ndotnet_naming_rule.camel_case_for_private_internal_fields.symbols  = private_internal_fields\ndotnet_naming_rule.camel_case_for_private_internal_fields.style    = camel_case_underscore_style\ndotnet_naming_symbols.private_internal_fields.applicable_kinds = field\ndotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal\ndotnet_naming_style.camel_case_underscore_style.required_prefix = _\ndotnet_naming_style.camel_case_underscore_style.capitalization = camel_case \n\n# Code style defaults\ncsharp_using_directive_placement = outside_namespace:suggestion\ndotnet_sort_system_directives_first = true\ncsharp_prefer_braces = true:refactoring\ncsharp_preserve_single_line_blocks = true:none\ncsharp_preserve_single_line_statements = false:none\ncsharp_prefer_static_local_function = true:suggestion\ncsharp_prefer_simple_using_statement = false:none\ncsharp_style_prefer_switch_expression = true:suggestion\n\n# Code quality\ndotnet_style_readonly_field = true:suggestion\ndotnet_code_quality_unused_parameters = non_public:suggestion\n\n# Expression-level preferences\ndotnet_style_object_initializer = true:suggestion\ndotnet_style_collection_initializer = true:suggestion\ndotnet_style_explicit_tuple_names = true:suggestion\ndotnet_style_coalesce_expression = true:suggestion\ndotnet_style_null_propagation = true:suggestion\ndotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion\ndotnet_style_prefer_inferred_tuple_names = true:suggestion\ndotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion\ndotnet_style_prefer_auto_properties = true:suggestion\ndotnet_style_prefer_conditional_expression_over_assignment = true:refactoring\ndotnet_style_prefer_conditional_expression_over_return = true:refactoring\ncsharp_prefer_simple_default_expression = true:suggestion\n\n# Expression-bodied members\ncsharp_style_expression_bodied_methods = true:refactoring\ncsharp_style_expression_bodied_constructors = true:refactoring\ncsharp_style_expression_bodied_operators = true:refactoring\ncsharp_style_expression_bodied_properties = true:refactoring\ncsharp_style_expression_bodied_indexers = true:refactoring\ncsharp_style_expression_bodied_accessors = true:refactoring\ncsharp_style_expression_bodied_lambdas = true:refactoring\ncsharp_style_expression_bodied_local_functions = true:refactoring\n\n# Pattern matching\ncsharp_style_pattern_matching_over_is_with_cast_check = true:suggestion\ncsharp_style_pattern_matching_over_as_with_null_check = true:suggestion\ncsharp_style_inlined_variable_declaration = true:suggestion\n\n# Null checking preferences\ncsharp_style_throw_expression = true:suggestion\ncsharp_style_conditional_delegate_call = true:suggestion\n\n# Other features\ncsharp_style_prefer_index_operator = false:none\ncsharp_style_prefer_range_operator = false:none\ncsharp_style_pattern_local_over_anonymous_function = false:none\n\n# Space preferences\ncsharp_space_after_cast = false\ncsharp_space_after_colon_in_inheritance_clause = true\ncsharp_space_after_comma = true\ncsharp_space_after_dot = false\ncsharp_space_after_keywords_in_control_flow_statements = true\ncsharp_space_after_semicolon_in_for_statement = true\ncsharp_space_around_binary_operators = before_and_after\ncsharp_space_around_declaration_statements = do_not_ignore\ncsharp_space_before_colon_in_inheritance_clause = true\ncsharp_space_before_comma = false\ncsharp_space_before_dot = false\ncsharp_space_before_open_square_brackets = false\ncsharp_space_before_semicolon_in_for_statement = false\ncsharp_space_between_empty_square_brackets = false\ncsharp_space_between_method_call_empty_parameter_list_parentheses = false\ncsharp_space_between_method_call_name_and_opening_parenthesis = false\ncsharp_space_between_method_call_parameter_list_parentheses = false\ncsharp_space_between_method_declaration_empty_parameter_list_parentheses = false\ncsharp_space_between_method_declaration_name_and_open_parenthesis = false\ncsharp_space_between_method_declaration_parameter_list_parentheses = false\ncsharp_space_between_parentheses = false\ncsharp_space_between_square_brackets = false\n\n# Analyzers\ndotnet_code_quality.ca1802.api_surface = private, internal\n\n# C++ Files\n[*.{cpp,h,in}]\ncurly_bracket_next_line = true\nindent_brace_style = Allman\n\n# Xml project files\n[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]\nindent_size = 2\n\n# Xml build files\n[*.builds]\nindent_size = 2\n\n# Xml files\n[*.{xml,stylecop,resx,ruleset}]\nindent_size = 2\n\n# Xml config files\n[*.{props,targets,config,nuspec}]\nindent_size = 2\n\n# Shell scripts\n[*.sh]\nend_of_line = lf\n[*.{cmd, bat}]\nend_of_line = crlf"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n\n# Visual Studio 2015/2017 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# Visual Studio 2017 auto generated files\nGenerated\\ Files/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# Benchmark Results\nBenchmarkDotNet.Artifacts/\n\n# .NET Core\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n**/Properties/launchSettings.json\n\n# StyleCop\nStyleCopReport.xml\n\n# Files built by Visual Studio\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.iobj\n*.pch\n*.pdb\n*.ipdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# Visual Studio Trace Files\n*.e2e\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# AxoCover is a Code Coverage Tool\n.axoCover/*\n!.axoCover/settings.json\n\n# Visual Studio code coverage results\n*.coverage\n*.coveragexml\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# Note: Comment the next line if you want to checkin your web deploy settings,\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/[Pp]ackages/*\n# except build/, which is used as an MSBuild target.\n!**/[Pp]ackages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/[Pp]ackages/repositories.config\n# NuGet v3's project.json files produces more ignorable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n*.appx\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.jfm\n*.pfx\n*.publishsettings\norleans.codegen.cs\n\n# Including strong name files can present a security risk \n# (https://github.com/github/gitignore/pull/2483#issue-259490424)\n#*.snk\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\nServiceFabricBackup/\n*.rptproj.bak\n\n# SQL Server files\n*.mdf\n*.ldf\n*.ndf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n*.rptproj.rsuser\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\nnode_modules/\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)\n*.vbw\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# JetBrains Rider\n.idea/\n*.sln.iml\n\n# CodeRush\n.cr/\n\n# Python Tools for Visual Studio (PTVS)\n__pycache__/\n*.pyc\n\n# Cake - Uncomment if you are using it\n# tools/**\n# !tools/packages.config\n\n# Tabs Studio\n*.tss\n\n# Telerik's JustMock configuration file\n*.jmconfig\n\n# BizTalk build output\n*.btp.cs\n*.btm.cs\n*.odx.cs\n*.xsd.cs\n\n# OpenCover UI analysis results\nOpenCover/\n\n# Azure Stream Analytics local run output \nASALocalRun/\n\n# MSBuild Binary and Structured Log\n*.binlog\n\n# NVidia Nsight GPU debugger configuration file\n*.nvuser\n\n# MFractors (Xamarin productivity tool) working folder \n.mfractor/\n\n.DS_Store\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n   // Use IntelliSense to find out which attributes exist for C# debugging\n   // Use hover for the description of the existing attributes\n   // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md\n   \"version\": \"0.2.0\",\n   \"configurations\": [\n        {\n            \"name\": \".NET Core Launch (console)\",\n            \"type\": \"coreclr\",\n            \"request\": \"launch\",\n            \"preLaunchTask\": \"build\",\n            // If you have changed target frameworks, make sure to update the program path.\n            \"program\": \"${workspaceFolder}/test/UnitTests/bin/Debug/netcoreapp3.0/UnitTests.dll\",\n            \"args\": [],\n            \"cwd\": \"${workspaceFolder}/test/UnitTests\",\n            // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console\n            \"console\": \"internalConsole\",\n            \"stopAtEntry\": false\n        },\n        {\n            \"name\": \".NET Core Attach\",\n            \"type\": \"coreclr\",\n            \"request\": \"attach\",\n            \"processId\": \"${command:pickProcess}\"\n        }\n    ]\n}"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n    \"workbench.colorCustomizations\": {\n        \"activityBar.background\": \"#2f7c47\",\n        \"activityBar.activeBorder\": \"#422c74\",\n        \"activityBar.foreground\": \"#e7e7e7\",\n        \"activityBar.inactiveForeground\": \"#e7e7e799\",\n        \"activityBarBadge.background\": \"#422c74\",\n        \"activityBarBadge.foreground\": \"#e7e7e7\",\n        \"titleBar.activeBackground\": \"#215732\",\n        \"titleBar.inactiveBackground\": \"#21573299\",\n        \"titleBar.activeForeground\": \"#e7e7e7\",\n        \"titleBar.inactiveForeground\": \"#e7e7e799\",\n        \"statusBar.background\": \"#215732\",\n        \"statusBarItem.hoverBackground\": \"#2f7c47\",\n        \"statusBar.foreground\": \"#e7e7e7\"\n    },\n    \"peacock.color\": \"#215732\"\n}"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "{\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"label\": \"build\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"build\",\n                \"${workspaceFolder}/test/UnitTests/UnitTests.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"publish\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"publish\",\n                \"${workspaceFolder}/test/UnitTests/UnitTests.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"watch\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"watch\",\n                \"run\",\n                \"${workspaceFolder}/test/UnitTests/UnitTests.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        }\n    ]\n}"
  },
  {
    "path": "FluentMediator.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26124.0\r\nMinimumVisualStudioVersion = 15.0.26124.0\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"src\", \"src\", \"{2F50D282-F726-49F8-87B7-5662493EDBCA}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"FluentMediator\", \"src\\FluentMediator\\FluentMediator.csproj\", \"{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"test\", \"test\", \"{62742B03-49D2-429F-A928-3E6DCA724943}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"UnitTests\", \"test\\UnitTests\\UnitTests.csproj\", \"{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"FluentMediator.Microsoft.Extensions.DependencyInjection\", \"src\\FluentMediator.Microsoft.Extensions.DependencyInjection\\FluentMediator.Microsoft.Extensions.DependencyInjection.csproj\", \"{2E365BC8-38CB-4FAD-B186-85F053B2D53F}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E}.Release|x86.Build.0 = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7}.Release|x86.Build.0 = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F}.Release|x86.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(NestedProjects) = preSolution\r\n\t\t{21CE6BEA-C0A5-4676-A56A-7574E1373A0E} = {2F50D282-F726-49F8-87B7-5662493EDBCA}\r\n\t\t{3F9FB7FC-68CA-451D-9828-323F20FB3DB7} = {62742B03-49D2-429F-A928-3E6DCA724943}\r\n\t\t{2E365BC8-38CB-4FAD-B186-85F053B2D53F} = {2F50D282-F726-49F8-87B7-5662493EDBCA}\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# FluentMediator\n[![Build Status](https://ivanpaulovich.visualstudio.com/FluentMediator/_apis/build/status/ivanpaulovich.FluentMediator?branchName=master)](https://ivanpaulovich.visualstudio.com/FluentMediator/_build/latest?definitionId=24&branchName=master) [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors) ![GitHub issues](https://img.shields.io/github/issues/ivanpaulovich/FluentMediator) ![GitHub pull requests](https://img.shields.io/github/issues-pr/ivanpaulovich/FluentMediator) <a href=\"https://www.nuget.org/packages/FluentMediator/\" rel=\"Paulovich.Caju\">![NuGet](https://buildstats.info/nuget/FluentMediator)</a>\n\n: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.\n\n## Install\n\n```\nInstall-Package FluentMediator\n```\n\nFor seameless .NET Core integration:\n\n```\nInstall-Package FluentMediator.Microsoft.Extensions.DependencyInjection\n```\n\n## How\n\nSetup 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:\n\n```c#\nservices.AddFluentMediator(builder => {\n    builder.On<PingRequest>().Pipeline()\n        .Call<IPingHandler>((handler, request) => handler.MyMethod(request))\n        .Call<IPingHandler>((handler, request) => handler.MyLongMethod(request))\n        .Return<PingResponse, IPingHandler>(\n            (handler, request) => handler.MyOtherMethod(request)\n        );\n});\n```\n\nThen you are able to use the injected `IMediator` interface.\n\n### Publishing Events\n\n```c#\n// Puts the message in the pipeline, calls three handlers.\nmediator.Publish<PingRequest>(ping);\n```\n\n### Sending Commands and Queries\n\n```c#\n// Calls the three handlers then get the response from `MyOtherMethod(PingRequest)`.\nPingResponse response = mediator.Send<PingResponse>(new PingRequest(\"Ping\"));\nConsole.WriteLine(response.Message); // Prints \"Pong\"\n```\n\n## Why\n\nWhen 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. \n\n## Contributors\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://paulovich.net\"><img src=\"https://avatars3.githubusercontent.com/u/7133698?v=4\" width=\"100px;\" alt=\"Ivan Paulovich\"/><br /><sub><b>Ivan Paulovich</b></sub></a><br /><a href=\"https://github.com/ivanpaulovich/FluentMediator/commits?author=ivanpaulovich\" title=\"Code\">💻</a> <a href=\"#design-ivanpaulovich\" title=\"Design\">🎨</a> <a href=\"https://github.com/ivanpaulovich/FluentMediator/commits?author=ivanpaulovich\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"http://www.carselind.se\"><img src=\"https://avatars1.githubusercontent.com/u/439028?v=4\" width=\"100px;\" alt=\"Joakim Carselind\"/><br /><sub><b>Joakim Carselind</b></sub></a><br /><a href=\"#review-joacar\" title=\"Reviewed Pull Requests\">👀</a> <a href=\"#ideas-joacar\" title=\"Ideas, Planning, & Feedback\">🤔</a></td>\n    <td align=\"center\"><a href=\"https://github.com/vag1830\"><img src=\"https://avatars2.githubusercontent.com/u/1694870?v=4\" width=\"100px;\" alt=\"Vaggelis Mparmpas\"/><br /><sub><b>Vaggelis Mparmpas</b></sub></a><br /><a href=\"https://github.com/ivanpaulovich/FluentMediator/commits?author=vag1830\" title=\"Tests\">⚠️</a></td>\n  </tr>\n</table>\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nPlease contribute with [Issues](https://github.com/ivanpaulovich/FluentMediator/issues), [Wiki](https://github.com/ivanpaulovich/FluentMediator/wiki) and [Samples](https://github.com/ivanpaulovich/FluentMediator/tree/master/samples).\n"
  },
  {
    "path": "azure-pipelines-1.yml",
    "content": "# ASP.NET Core (.NET Framework)\n# Build and test ASP.NET Core projects targeting the full .NET Framework.\n# Add steps that publish symbols, save build artifacts, and more:\n# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core\n\ntrigger:\n  tags:\n    include:\n    - v*\n\npool:\n  vmImage: 'windows-latest'\n\nvariables:\n  solution: '**/*.sln'\n  buildPlatform: 'Any CPU'\n  buildConfiguration: 'Release'\n\nsteps:\n- task: NuGetToolInstaller@1\n\n- task: NuGetCommand@2\n  inputs:\n    restoreSolution: '$(solution)'\n\n- task: VSBuild@1\n  inputs:\n    solution: '$(solution)'\n    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation=\"$(build.artifactStagingDirectory)\\WebApp.zip\" /p:DeployIisAppPath=\"Default Web Site\"'\n    platform: '$(buildPlatform)'\n    configuration: '$(buildConfiguration)'\n\n- task: DotNetCoreCLI@2\n  inputs:\n    command: 'test'\n    projects: 'test/UnitTests/UnitTests.csproj'\n    testRunTitle: 'Test'\n\n- task: DotNetCoreCLI@2\n  inputs:\n    command: 'pack'\n    packagesToPack: 'src/**/*.csproj'\n    nobuild: true\n    includesymbols: true\n    includesource: true\n    versioningScheme: 'off'\n    \n- task: GitHubRelease@1\n  inputs:\n    gitHubConnection: ivanpaulovich-github\n    repositoryName: '$(Build.Repository.Name)'\n    action: 'create'\n    target: '$(Build.SourceVersion)'\n    tagSource: 'gitTag'\n    changeLogCompareToRelease: 'lastFullRelease'\n    changeLogType: 'commitBased'\n\n- task: NuGetCommand@2\n  inputs:\n    command: 'push'\n    packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'\n    nuGetFeedType: 'external'\n    publishFeedCredentials: 'NugetOrg'"
  },
  {
    "path": "azure-pipelines.yml",
    "content": "# ASP.NET Core (.NET Framework)\n# Build and test ASP.NET Core projects targeting the full .NET Framework.\n# Add steps that publish symbols, save build artifacts, and more:\n# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core\n\ntrigger:\n- master\n\npool:\n  vmImage: 'windows-latest'\n\nvariables:\n  solution: '**/*.sln'\n  buildPlatform: 'Any CPU'\n  buildConfiguration: 'Release'\n\nsteps:\n- task: NuGetToolInstaller@1\n\n- task: NuGetCommand@2\n  inputs:\n    restoreSolution: '$(solution)'\n\n- task: VSBuild@1\n  inputs:\n    solution: '$(solution)'\n    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation=\"$(build.artifactStagingDirectory)\\WebApp.zip\" /p:DeployIisAppPath=\"Default Web Site\"'\n    platform: '$(buildPlatform)'\n    configuration: '$(buildConfiguration)'\n\n- task: DotNetCoreCLI@2\n  inputs:\n    command: 'test'\n    projects: 'test/UnitTests/UnitTests.csproj'\n    testRunTitle: 'Test'"
  },
  {
    "path": "changelog.md",
    "content": "# Change Log\n\n## 2020-02-04 - 0.4.7\n\n- #48 Changed `PipelineNotFoundException` to internal.\n- #48 Removed sealed modified from Mediator to allow derived implementations.\n- #48 Added `OnPipelineNotFound` event to `IMediator` interface.\n- #48 Added `void OnPipelineNotFound(PipelineNotFoundEventArgs e)` handler to `Mediator` class.\n\n## 2019-10-20 - 0.4.6\n\n* #25 Cancellation Token fixed.\n* Added XML docs.\n\n## 2019-10-20 - 0.4.5\n\n* #37 Validation for Null Requests added.\n\n## 2019-10-20 - 0.4.3\n\n* #2 Support o Named Pipelines Added.\n\n## 2019-10-20 - 0.4.0\n\n* Refactoring.\n\n## 2019-10-19 - 0.3.3\n\n* #31 Support Scoped & Transient Lifetime.\n* Refactoring Tests.\n\n## 2019-10-19 - 0.3.2\n\n* Nuget Package Metadata added.\n\n## 2019-10-13 - 0.3.1\n\n* Implementation details made internal.\n\n## 2019-10-13 - 0.3.0\n\n* #32 Segregated Builder and Messaging interfaces.\n* #31 Support Scoped & Transient Lifetime.\n\n## 2019-10-13 - 0.2.0\n\n* #27 Added PipelineAlreadyExistsException.\n* #27 Added PipelineNotFoundException.\n\n## 2019-10-13 - 0.1.0\n\n* #24 Added ReturnFunctionIsNullException for misconfigured Pipelines.\n* SendAsync(request, ct) added to the public interfaces.\n* Refactoring.\n"
  },
  {
    "path": "samples/AspNetCore/.vscode/launch.json",
    "content": "{\n   // Use IntelliSense to find out which attributes exist for C# debugging\n   // Use hover for the description of the existing attributes\n   // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md\n   \"version\": \"0.2.0\",\n   \"configurations\": [\n        {\n            \"name\": \".NET Core Launch (web)\",\n            \"type\": \"coreclr\",\n            \"request\": \"launch\",\n            \"preLaunchTask\": \"build\",\n            // If you have changed target frameworks, make sure to update the program path.\n            \"program\": \"${workspaceFolder}/src/WebApi/bin/Debug/netcoreapp3.0/WebApi.dll\",\n            \"args\": [],\n            \"cwd\": \"${workspaceFolder}/src/WebApi\",\n            \"stopAtEntry\": false,\n            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser\n            \"serverReadyAction\": {\n                \"action\": \"openExternally\",\n                \"pattern\": \"^\\\\s*Now listening on:\\\\s+(https?://\\\\S+)\"                \n            },\n            \"env\": {\n                \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n            },\n            \"sourceFileMap\": {\n                \"/Views\": \"${workspaceFolder}/Views\"\n            }\n        },\n        {\n            \"name\": \".NET Core Attach\",\n            \"type\": \"coreclr\",\n            \"request\": \"attach\",\n            \"processId\": \"${command:pickProcess}\"\n        }\n    ]\n}"
  },
  {
    "path": "samples/AspNetCore/.vscode/tasks.json",
    "content": "{\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"label\": \"build\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"build\",\n                \"${workspaceFolder}/src/WebApi/WebApi.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"publish\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"publish\",\n                \"${workspaceFolder}/src/WebApi/WebApi.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"watch\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"watch\",\n                \"run\",\n                \"${workspaceFolder}/src/WebApi/WebApi.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        }\n    ]\n}"
  },
  {
    "path": "samples/AspNetCore/Wallet.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26124.0\r\nMinimumVisualStudioVersion = 15.0.26124.0\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"src\", \"src\", \"{E199B813-DCAA-4DED-A175-38BFE58E37C2}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Core\", \"src\\Core\\Core.csproj\", \"{8072924A-5C32-49C3-9314-40B1B274A572}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Infrastructure\", \"src\\Infrastructure\\Infrastructure.csproj\", \"{93CE9A2D-B055-4E18-B7DE-C59441A02A84}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"WebApi\", \"src\\WebApi\\WebApi.csproj\", \"{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"test\", \"test\", \"{8660B991-2482-4B36-BDBF-873136F571AD}\"\r\nEndProject\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"UnitTests\", \"test\\UnitTests\\UnitTests.csproj\", \"{34641012-F6D1-46FD-95EC-BC03E79AC67F}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572}.Release|x86.Build.0 = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84}.Release|x86.Build.0 = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F}.Release|x86.Build.0 = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F}.Release|x86.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(NestedProjects) = preSolution\r\n\t\t{8072924A-5C32-49C3-9314-40B1B274A572} = {E199B813-DCAA-4DED-A175-38BFE58E37C2}\r\n\t\t{93CE9A2D-B055-4E18-B7DE-C59441A02A84} = {E199B813-DCAA-4DED-A175-38BFE58E37C2}\r\n\t\t{E6077B21-BD4C-4F90-B6F8-3C2F88994A8F} = {E199B813-DCAA-4DED-A175-38BFE58E37C2}\r\n\t\t{34641012-F6D1-46FD-95EC-BC03E79AC67F} = {8660B991-2482-4B36-BDBF-873136F571AD}\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "samples/AspNetCore/src/Core/Core.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netstandard2.1</TargetFramework>\r\n    <Nullable>enable</Nullable>\r\n    <NullableReferenceTypes>true</NullableReferenceTypes>\r\n    <LangVersion>8.0</LangVersion>\r\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\r\n  </PropertyGroup>\r\n\r\n</Project>\r\n"
  },
  {
    "path": "samples/AspNetCore/src/Core/Services/ICustomerRepository.cs",
    "content": "using Core.Wallet;\n\nnamespace Core.Services\n{\n    public interface ICustomerRepository\n    {\n        void Add(Customer customer);\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Core/UseCases/IRegisterUseCase.cs",
    "content": "namespace Core.UseCases\n{\n    public interface IRegisterUseCase\n    {\n        RegisterResponse Execute(RegisterCommand registerCommand);\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Core/UseCases/Register.cs",
    "content": "using Core.Services;\nusing Core.Wallet;\n\nnamespace Core.UseCases\n{\n    public class Register : IRegisterUseCase\n    {\n        private readonly ICustomerRepository _customerRepository;\n\n        public Register(ICustomerRepository customerRepository)\n        {\n            _customerRepository = customerRepository;\n        }\n\n        public RegisterResponse Execute(RegisterCommand registerCommand)\n        {\n            var customer = new Customer(\n                registerCommand.Name,\n                registerCommand.SSN,\n                registerCommand.Balance\n            );\n\n            _customerRepository.Add(customer);\n\n            return new RegisterResponse(customer.Id);\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Core/UseCases/RegisterCommand.cs",
    "content": "namespace Core.UseCases\n{\n    public class RegisterCommand\n    {\n        public string Name { get; private set; }\n        public string SSN { get; private set; }\n        public decimal Balance { get; private set; }\n\n        public RegisterCommand(string name, string ssn, decimal balance)\n        {\n            Name = name;\n            SSN = ssn;\n            Balance = balance;\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Core/UseCases/RegisterResponse.cs",
    "content": "using System;\n\nnamespace Core.UseCases\n{\n    public class RegisterResponse\n    {\n        public Guid UserId { get; private set; }\n\n        public RegisterResponse(Guid userId)\n        {\n            UserId = userId;\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Core/Wallet/Customer.cs",
    "content": "using System;\n\nnamespace Core.Wallet\n{\n    public class Customer\n    {\n        public Guid Id { get; protected set; }\n        public string Name { get; protected set; }\n        public string SSN { get; protected set; }\n        public decimal Balance { get; protected set; }\n        public DateTime Timestamp { get; protected set; }\n\n        public Customer(string name, string ssn, decimal balance)\n        {\n            Id = Guid.NewGuid();\n            Name = name;\n            SSN = ssn;\n            Balance = balance;\n            Timestamp = DateTime.Now;\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Infrastructure/InMemory/CustomerRepository.cs",
    "content": "using System.Collections.Generic;\nusing Core.Services;\nusing Core.Wallet;\n\nnamespace Infrastructure.InMemory\n{\n    public class CustomerRepository : ICustomerRepository\n    {\n        public IList<Customer> Customers { get; }\n\n        public CustomerRepository()\n        {\n            Customers = new List<Customer>();\n        }\n\n        public void Add(Customer customer)\n        {\n            Customers.Add(customer);\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/Infrastructure/Infrastructure.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netstandard2.1</TargetFramework>\r\n    <Nullable>enable</Nullable>\r\n    <NullableReferenceTypes>true</NullableReferenceTypes>\r\n    <LangVersion>8.0</LangVersion>\r\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Core\\Core.csproj\" />\r\n  </ItemGroup>\r\n  \r\n</Project>\r\n"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/Controllers/Register/CustomersController.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Core.UseCases;\nusing FluentMediator;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace WebApi.Controllers.Register\n{\n    [Route(\"api/[controller]\")]\n    [ApiController]\n    public class CustomersController : ControllerBase\n    {\n        private readonly IMediator _mediator;\n\n        public CustomersController(IMediator mediator)\n        {\n            _mediator = mediator;\n        }\n\n        [HttpPost]\n        public IActionResult Post([FromBody][Required] RegisterRequest request)\n        {\n            var registerCommand = new RegisterCommand(\n                request.Name,\n                request.SSN,\n                request.Balance\n            );\n\n            var response = _mediator.Send<RegisterResponse>(registerCommand);\n\n            return Ok(response);\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/Controllers/Register/RegisterRequest.cs",
    "content": "namespace WebApi.Controllers.Register\n{\n    public class RegisterRequest\n    {\n        public string Name { get; set; }\n        public string SSN { get; set; }\n        public decimal Balance { get; set; }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/Program.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Extensions.Logging;\n\nnamespace WebApi\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            CreateHostBuilder(args).Build().Run();\n        }\n\n        public static IHostBuilder CreateHostBuilder(string[] args) =>\n            Host.CreateDefaultBuilder(args)\n            .ConfigureWebHostDefaults(webBuilder =>\n            {\n                webBuilder.UseStartup<Startup>();\n            });\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/Startup.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Core.Services;\nusing Core.UseCases;\nusing FluentMediator;\nusing Infrastructure.InMemory;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.HttpsPolicy;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Extensions.Logging;\n\nnamespace WebApi\n{\n    public class Startup\n    {\n        public Startup(IConfiguration configuration)\n        {\n            Configuration = configuration;\n        }\n\n        public IConfiguration Configuration { get; }\n\n        // This method gets called by the runtime. Use this method to add services to the container.\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddControllers();\n\n            services.AddTransient<IRegisterUseCase, Register>();\n            services.AddTransient<ICustomerRepository, CustomerRepository>();\n\n            services.AddFluentMediator(builder =>\n            {\n                builder.On<RegisterCommand>().Pipeline()\n                    .Return<RegisterResponse, IRegisterUseCase>(\n                        (handler, request) => handler.Execute(request));\n            });\n        }\n\n        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.\n        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n        {\n            if (env.IsDevelopment())\n            {\n                app.UseDeveloperExceptionPage();\n            }\n\n            app.UseHttpsRedirection();\n\n            app.UseRouting();\n\n            app.UseAuthorization();\n\n            app.UseEndpoints(endpoints =>\n            {\n                endpoints.MapControllers();\n            });\n        }\n    }\n}"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/WebApi.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netcoreapp3.0</TargetFramework>\r\n    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Core\\Core.csproj\" />\r\n    <ProjectReference Include=\"..\\Infrastructure\\Infrastructure.csproj\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\..\\..\\src\\FluentMediator\\FluentMediator.csproj\" />\r\n    <ProjectReference Include=\"..\\..\\..\\..\\src\\FluentMediator.Microsoft.Extensions.DependencyInjection\\FluentMediator.Microsoft.Extensions.DependencyInjection.csproj\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/appsettings.Development.json",
    "content": "{\r\n  \"Logging\": {\r\n    \"LogLevel\": {\r\n      \"Default\": \"Debug\",\r\n      \"System\": \"Information\",\r\n      \"Microsoft\": \"Information\"\r\n    }\r\n  }\r\n}\r\n"
  },
  {
    "path": "samples/AspNetCore/src/WebApi/appsettings.json",
    "content": "{\r\n  \"Logging\": {\r\n    \"LogLevel\": {\r\n      \"Default\": \"Information\",\r\n      \"Microsoft\": \"Warning\",\r\n      \"Microsoft.Hosting.Lifetime\": \"Information\"\r\n    }\r\n  },\r\n  \"AllowedHosts\": \"*\"\r\n}\r\n"
  },
  {
    "path": "samples/AspNetCore/test/UnitTests/UnitTests.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netcoreapp3.0</TargetFramework>\r\n    <IsPackable>false</IsPackable>\r\n    <Nullable>enable</Nullable>\r\n    <NullableReferenceTypes>true</NullableReferenceTypes>\r\n    <LangVersion>8.0</LangVersion>\r\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"16.3.0\" />\r\n    <PackageReference Include=\"xunit\" Version=\"2.4.1\" />\r\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.4.1\" />\r\n    <PackageReference Include=\"coverlet.collector\" Version=\"1.1.0\" />\r\n    <PackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"3.0.0\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\src\\Core\\Core.csproj\" />\r\n    <ProjectReference Include=\"..\\..\\src\\Infrastructure\\Infrastructure.csproj\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n"
  },
  {
    "path": "samples/AspNetCore/test/UnitTests/UseCasesTests/RegisterTests.cs",
    "content": "using Core.UseCases;\nusing Infrastructure.InMemory;\nusing Xunit;\n\nnamespace UnitTests.UseCasesTests\n{\n    public class RegisterTests\n    {\n        [Fact]\n        public void Register_PublishesEvent()\n        {\n            // Arrange\n            var customerRepository = new CustomerRepository();\n            var sut = new Register(customerRepository);\n            var registerCommand = new RegisterCommand(\n                \"Ivan Paulovich\",\n                \"198608175555\",\n                460\n            );\n            \n            // Act\n            var response = sut.Execute(registerCommand);\n            \n            // Assert\n            Assert.NotEmpty(customerRepository.Customers);\n        }\n    }\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/.vscode/launch.json",
    "content": "{\n   // Use IntelliSense to find out which attributes exist for C# debugging\n   // Use hover for the description of the existing attributes\n   // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md\n   \"version\": \"0.2.0\",\n   \"configurations\": [\n        {\n            \"name\": \".NET Core Launch (console)\",\n            \"type\": \"coreclr\",\n            \"request\": \"launch\",\n            \"preLaunchTask\": \"build\",\n            // If you have changed target frameworks, make sure to update the program path.\n            \"program\": \"${workspaceFolder}/PingPong/bin/Debug/netcoreapp3.0/PingPong.dll\",\n            \"args\": [],\n            \"cwd\": \"${workspaceFolder}/PingPong\",\n            // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console\n            \"console\": \"internalConsole\",\n            \"stopAtEntry\": false\n        },\n        {\n            \"name\": \".NET Core Attach\",\n            \"type\": \"coreclr\",\n            \"request\": \"attach\",\n            \"processId\": \"${command:pickProcess}\"\n        }\n    ]\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/.vscode/settings.json",
    "content": "{\n    \"workbench.colorCustomizations\": {\n        \"activityBar.background\": \"#1f6fd0\",\n        \"activityBar.foreground\": \"#e7e7e7\",\n        \"activityBar.inactiveForeground\": \"#e7e7e799\",\n        \"activityBarBadge.background\": \"#ee90bb\",\n        \"activityBarBadge.foreground\": \"#15202b\",\n        \"titleBar.activeBackground\": \"#1857a4\",\n        \"titleBar.inactiveBackground\": \"#1857a499\",\n        \"titleBar.activeForeground\": \"#e7e7e7\",\n        \"titleBar.inactiveForeground\": \"#e7e7e799\",\n        \"statusBar.background\": \"#1857a4\",\n        \"statusBarItem.hoverBackground\": \"#1f6fd0\",\n        \"statusBar.foreground\": \"#e7e7e7\"\n    },\n    \"peacock.color\": \"#1857a4\"\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/.vscode/tasks.json",
    "content": "{\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"label\": \"build\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"build\",\n                \"${workspaceFolder}/PingPong/PingPong.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"publish\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"publish\",\n                \"${workspaceFolder}/PingPong/PingPong.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        },\n        {\n            \"label\": \"watch\",\n            \"command\": \"dotnet\",\n            \"type\": \"process\",\n            \"args\": [\n                \"watch\",\n                \"run\",\n                \"${workspaceFolder}/PingPong/PingPong.csproj\",\n                \"/property:GenerateFullPaths=true\",\n                \"/consoleloggerparameters:NoSummary\"\n            ],\n            \"problemMatcher\": \"$msCompile\"\n        }\n    ]\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/PingPong/PingHandler.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace PingPong\n{\n    public class PingHandler\n    {\n        public void MyMethod(PingRequest request)\n        {\n            Console.WriteLine($\"{ request.Message } .. Pong \");\n        }\n\n        public void MyLongMethod(PingRequest request)\n        {\n            Console.WriteLine($\"{ request.Message } ............... Pong\");\n        }\n\n        public async Task MyMethodAsync(PingRequest request)\n        {\n            Console.WriteLine($\"{ request.Message } > > > > Pong \");\n            await Task.CompletedTask;\n        }\n\n        public async Task MyMethodAsync(PingRequest request, CancellationToken cancelationToken)\n        {\n            Console.WriteLine($\"{ request.Message } - - - - - Pong \");\n            await Task.CompletedTask;\n        }\n    }\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/PingPong/PingPong.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <OutputType>Exe</OutputType>\r\n    <TargetFramework>netcoreapp2.2</TargetFramework>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\..\\src\\FluentMediator\\FluentMediator.csproj\" />\r\n    <ProjectReference Include=\"..\\..\\..\\src\\FluentMediator.Microsoft.Extensions.DependencyInjection\\FluentMediator.Microsoft.Extensions.DependencyInjection.csproj\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"3.0.0\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n"
  },
  {
    "path": "samples/SimpleConsoleApp/PingPong/PingRequest.cs",
    "content": "namespace PingPong\n{\n    public class PingRequest\n    {\n        public string Message { get; }\n\n        public PingRequest(string message)\n        {\n            Message = message;\n        }\n    }\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/PingPong/Program.cs",
    "content": "using System;\nusing System.Threading;\nusing FluentMediator;\nusing Microsoft.Extensions.DependencyInjection;\n\nnamespace PingPong\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            var serviceCollection = new ServiceCollection();\n            serviceCollection.AddFluentMediator(builder =>\n            {\n                builder.On<PingRequest>().Pipeline()\n                    .Call<PingHandler>((handler, req) => handler.MyMethod(req))\n                    .Call<PingHandler>((handler, req) => handler.MyLongMethod(req));\n                builder.On<PingRequest>().PipelineAsync()\n                    .Call<PingHandler>(async(handler, req) => await handler.MyMethodAsync(req));\n                builder.On<PingRequest>().CancellablePipelineAsync()\n                    .Call<PingHandler>(async(handler, req, ct) => await handler.MyMethodAsync(req, ct));\n            });\n            serviceCollection.AddScoped<PingHandler>();\n\n            var provider = serviceCollection.BuildServiceProvider();\n            var mediator = provider.GetService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n            var cts = new CancellationTokenSource();\n\n            Console.WriteLine(\"Publishing Ping. Should Pong Twice.\");\n\n            mediator.Publish(ping);\n\n            Console.WriteLine(\"Publishing Ping Async. Should Pong One.\");\n\n            mediator.PublishAsync(ping)\n                .GetAwaiter()\n                .GetResult();\n\n            Console.WriteLine(\"Publishing Cancellable Ping. Should Pong One.\");\n\n            mediator.PublishAsync(ping, cts.Token)\n                .GetAwaiter()\n                .GetResult();\n\n            Console.ReadLine();\n        }\n    }\n}"
  },
  {
    "path": "samples/SimpleConsoleApp/Samples.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26124.0\r\nMinimumVisualStudioVersion = 15.0.26124.0\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"PingPong\", \"PingPong\\PingPong.csproj\", \"{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|x64.ActiveCfg = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|x64.Build.0 = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|x86.ActiveCfg = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Debug|x86.Build.0 = Debug|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|x64.ActiveCfg = Release|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|x64.Build.0 = Release|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|x86.ActiveCfg = Release|Any CPU\r\n\t\t{F3A8DBEF-1CE1-4456-9B65-5A37A57B3A4E}.Release|x86.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "src/FluentMediator/FluentMediator.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netstandard1.1</TargetFramework>\r\n    <Nullable>enable</Nullable>\r\n    <NullableReferenceTypes>true</NullableReferenceTypes>\r\n    <LangVersion>8.0</LangVersion>\r\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\r\n    <DocumentationFile>bin\\$(Configuration)\\$(TargetFramework)\\$(AssemblyName).xml</DocumentationFile>\r\n  </PropertyGroup>\r\n\r\n\t<PropertyGroup>\r\n    <PackageId>FluentMediator</PackageId>\r\n    <Version>0.4.7</Version>\r\n    <Authors>Ivan Paulovich</Authors>\r\n    <Copyright>Ivan Paulovich</Copyright>\r\n    <Description>FluentMediator is an unobtrusive library that allows developers to build custom pipelines for Commands, Queries and Events.</Description>\r\n    <PackageDescription>FluentMediator is an unobtrusive library that allows developers to build custom pipelines for Commands, Queries and Events.</PackageDescription>\r\n    <PackageTags>fluent-design;mediator-pattern;ddd-cqrs;message-bus;event-sourcing;event-driven;chain-of-responsibility;chain-methods;pipelines;dotnet-core;craftmanship;tdd;csharp;pipeline-framework;fluent-interface;event-handlers</PackageTags>\r\n    <IsPackable>true</IsPackable>\r\n    <PackageIcon>icon.png</PackageIcon>\r\n    <RepositoryUrl>https://github.com/ivanpaulovich/FluentMediator</RepositoryUrl>\r\n    <NeutralLanguage>en-US</NeutralLanguage>\r\n\t</PropertyGroup>\r\n\r\n  <ItemGroup Label=\"SourceLink\">\r\n    <PackageReference Include=\"Microsoft.SourceLink.GitHub\" Version=\"1.0.0\" PrivateAssets=\"All\" />\r\n  </ItemGroup>\r\n\r\n  <PropertyGroup Label=\"SourceLink\">\r\n    <PublishRepositoryUrl>true</PublishRepositoryUrl>\r\n    <IncludeSymbols>true</IncludeSymbols>\r\n    <SymbolPackageFormat>snupkg</SymbolPackageFormat>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <None Include=\"../../docs/icon.png\">\r\n      <Pack>True</Pack>\r\n      <PackagePath></PackagePath>\r\n    </None>\r\n  </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "src/FluentMediator/GetService.cs",
    "content": "using System;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Retrieves a Handler Service from the Container\n    /// </summary>\n    /// <param name=\"serviceType\"></param>\n    /// <returns></returns>\n    public delegate object GetService(Type serviceType);\n}"
  },
  {
    "path": "src/FluentMediator/IMediator.cs",
    "content": "using System;\nusing FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Publishes/Sends messages through the Pipelines\n    /// </summary>\n    public interface IMediator:\n        ISyncMediator,\n        IAsyncMediator,\n        ICancellableMediator\n        {\n            /// <summary>\n            /// On Pipeline Not Found Event Handler.\n            /// </summary>\n            event EventHandler<PipelineNotFoundEventArgs> ? PipelineNotFound;\n        }\n}"
  },
  {
    "path": "src/FluentMediator/IPipelineProvider.cs",
    "content": "using FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Retrieves a Pipeline for a specific Message\n    /// </summary>\n    public interface IPipelineProvider:\n        ISyncPipelineProvider,\n        IAsyncPipelineProvider,\n        ICancellablePipelineProvider { }\n}"
  },
  {
    "path": "src/FluentMediator/IPipelineProviderBuilder.cs",
    "content": "using FluentMediator.Pipelines;\nusing FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Builds pipelines for a specific message\n    /// </summary>\n    public interface IPipelineProviderBuilder:\n        ISyncPipelineProviderBuilder,\n        IAsyncPipelineProviderBuilder,\n        ICancellablePipelineProviderBuilder\n        {\n            /// <summary>\n            /// Begin building a pipeline for a specific message\n            /// </summary>\n            /// <typeparam name=\"TRequest\">Message Type</typeparam>\n            /// <returns>A more specific PipelineBehavior</returns>\n            IPipelineBehavior<TRequest> On<TRequest>();\n\n            /// <summary>\n            /// Builds the pipeline\n            /// </summary>\n            /// <returns>An immutable Pipeline Provider</returns>\n            IPipelineProvider Build();\n        }\n}"
  },
  {
    "path": "src/FluentMediator/Mediator.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing FluentMediator.Pipelines;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Publishes/Sends messages through the Pipelines\n    /// </summary>\n    public class Mediator : IMediator\n    {\n        /// <summary>\n        /// Returns a service from the Container\n        /// </summary>\n        /// <value></value>\n        public GetService GetService { get; }\n\n        private IPipelineProvider _pipelines;\n\n        /// <summary>\n        /// On Pipeline Not Found Handler.\n        /// </summary>\n        public event EventHandler<PipelineNotFoundEventArgs> ? PipelineNotFound;\n\n        /// <summary>\n        /// Instantiate a Mediator\n        /// </summary>\n        /// <param name=\"getService\">Service Provider</param>\n        /// <param name=\"pipelines\">Pipeline Provider</param>\n        public Mediator(\n            GetService getService,\n            IPipelineProvider pipelines)\n        {\n            GetService = getService;\n            _pipelines = pipelines;\n        }\n\n        /// <summary>\n        /// Publishes messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"pipelineName\">An optional pipeline name</param>\n        public void Publish(object request, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            try\n            {\n                if (pipelineName is string)\n                {\n                    var pipeline = _pipelines.GetPipeline(pipelineName);\n                    pipeline.Publish(GetService, request!);\n                }\n                else\n                {\n                    var pipeline = _pipelines.GetPipeline(request.GetType());\n                    pipeline.Publish(GetService, request!);\n                }\n            }\n            catch (PipelineNotFoundException)\n            {\n                var e = new PipelineNotFoundEventArgs(request);\n                OnPipelineNotFound(e);\n            }\n        }\n\n        /// <summary>\n        /// Publishes messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"pipelineName\">An optional pipeline name</param>\n        /// <typeparam name=\"TResult\">The desired Typed result</typeparam>\n        /// <returns>The result object</returns>\n        public TResult Send<TResult>(object request, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            if (pipelineName is string)\n            {\n                var pipeline = _pipelines.GetPipeline(pipelineName);\n                return pipeline.Send<TResult>(GetService, request);\n            }\n            else\n            {\n                var pipeline = _pipelines.GetPipeline(request.GetType());\n                return pipeline.Send<TResult>(GetService, request);\n            }\n        }\n\n        /// <summary>\n        /// Publishes messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"pipelineName\">An optional pipeline name</param>\n        /// <returns>Task object</returns>\n        public async Task PublishAsync(object request, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            if (pipelineName is string)\n            {\n                var pipeline = _pipelines.GetAsyncPipeline(pipelineName);\n                await pipeline.PublishAsync(GetService, request);\n            }\n            else\n            {\n                var pipeline = _pipelines.GetAsyncPipeline(request.GetType());\n                await pipeline.PublishAsync(GetService, request);\n            }\n        }\n\n        /// <summary>\n        /// Publishes messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"pipelineName\">An optional pipeline name</param>\n        /// <typeparam name=\"TResult\">The desired Typed result</typeparam>\n        /// <returns>The result object</returns>\n        public async Task<TResult> SendAsync<TResult>(object request, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            if (pipelineName is string)\n            {\n                var pipeline = _pipelines.GetAsyncPipeline(pipelineName);\n                return await pipeline.SendAsync<TResult>(GetService, request);\n            }\n            else\n            {\n                var pipeline = _pipelines.GetAsyncPipeline(request.GetType());\n                return await pipeline.SendAsync<TResult>(GetService, request);\n            }\n        }\n\n        /// <summary>\n        /// Publishes messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token to gracefully exit in middle of execution</param>\n        /// <param name=\"pipelineName\">Optional Pipeline Name</param>\n        /// <returns>Task object</returns>\n        public async Task PublishAsync(object request, CancellationToken cancellationToken, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            if (pipelineName is string)\n            {\n                var pipeline = _pipelines.GetCancellablePipeline(pipelineName);\n                await pipeline.PublishAsync(GetService, request, cancellationToken);\n            }\n            else\n            {\n                var pipeline = _pipelines.GetCancellablePipeline(request.GetType());\n                await pipeline.PublishAsync(GetService, request, cancellationToken);\n            }\n        }\n\n        /// <summary>\n        /// Sends messages through the Pipeline\n        /// </summary>\n        /// <param name=\"request\">Message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token to gracefully exit in middle of execution</param>\n        /// <param name=\"pipelineName\">Optional Pipeline Name</param>\n        /// <typeparam name=\"TResult\">Result Type</typeparam>\n        /// <returns>Result object</returns>\n        public async Task<TResult> SendAsync<TResult>(object request, CancellationToken cancellationToken, string? pipelineName = null)\n        {\n            if (request is null)\n            {\n                throw new NullRequestException(\"The request is null.\");\n            }\n\n            if (pipelineName is string)\n            {\n                var pipeline = _pipelines.GetCancellablePipeline(pipelineName);\n                return await pipeline.SendAsync<TResult>(GetService, request, cancellationToken);\n            }\n            else\n            {\n                var pipeline = _pipelines.GetCancellablePipeline(request.GetType());\n                return await pipeline.SendAsync<TResult>(GetService, request, cancellationToken);\n            }\n        }\n\n        /// <summary>\n        /// On Pipeline Not Found.\n        /// </summary>\n        /// <param name=\"e\">OnErrorEventArgs.</param>\n        protected virtual void OnPipelineNotFound(PipelineNotFoundEventArgs e)\n        {\n            if (this.PipelineNotFound is EventHandler<PipelineNotFoundEventArgs>)\n            {\n                this.PipelineNotFound(this, e);\n            }\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/MediatorException.cs",
    "content": "using System;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// All Exceptions from FluentMediator are derived from MediatorException\n    /// </summary>\n    public class MediatorException : Exception\n    {\n        /// <summary>\n        /// Instantiate a MediatorException\n        /// </summary>\n        /// <param name=\"message\">Error message</param>\n        /// <returns>The exception</returns>\n        public MediatorException(string message) : base(message) { }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/NullRequestException.cs",
    "content": "namespace FluentMediator\n{\n    /// <summary>\n    /// Occurs when the message is null\n    /// </summary>\n    public class NullRequestException : MediatorException\n    {\n        /// <summary>\n        /// Instantiate an Exception\n        /// </summary>\n        /// <param name=\"message\">The message</param>\n        /// <returns>An Exception instance</returns>\n        public NullRequestException(string message) : base(message) { }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/PipelineNotFoundEventArgs.cs",
    "content": "using System;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// On Error Event.\n    /// </summary>\n    public class PipelineNotFoundEventArgs : EventArgs\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <value></value>\n        public object Message { get; }\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"message\"></param>\n        public PipelineNotFoundEventArgs(object message)\n        {\n            this.Message = message;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/PipelineProvider.cs",
    "content": "using System;\nusing FluentMediator.Pipelines;\nusing FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// Retrieves Pipelines for a message\n    /// </summary>\n    internal sealed class PipelineProvider : IPipelineProvider\n    {\n        private readonly IPipelineCollection<IPipeline> _pipelineCollection;\n        private readonly IPipelineCollection<IPipelineAsync> _asyncPipelineCollection;\n        private readonly IPipelineCollection<ICancellablePipelineAsync> _cancellablePipelineCollection;\n\n        /// <summary>\n        /// Instantiate a PipelineProvider\n        /// </summary>\n        /// <param name=\"pipelineCollection\">Sync Pipelines</param>\n        /// <param name=\"asyncPipelineCollection\">Async Pipelines</param>\n        /// <param name=\"cancellablePipelineCollection\">Cancellable Pipelines</param>\n        public PipelineProvider(\n            IPipelineCollection<IPipeline> pipelineCollection,\n            IPipelineCollection<IPipelineAsync> asyncPipelineCollection,\n            IPipelineCollection<ICancellablePipelineAsync> cancellablePipelineCollection)\n        {\n            _pipelineCollection = pipelineCollection;\n            _asyncPipelineCollection = asyncPipelineCollection;\n            _cancellablePipelineCollection = cancellablePipelineCollection;\n        }\n\n        /// <summary>\n        /// Gets an async pipeline\n        /// </summary>\n        /// <param name=\"requestType\">Message Type</param>\n        /// <returns>Pipeline</returns>\n        public IPipelineAsync GetAsyncPipeline(Type requestType)\n        {\n            return _asyncPipelineCollection.Get(requestType);\n        }\n\n        /// <summary>\n        /// Gets an async pipeline\n        /// </summary>\n        /// <param name=\"pipelineName\">Pipeline Name</param>\n        /// <returns>Pipeline</returns>\n        public IPipelineAsync GetAsyncPipeline(string pipelineName)\n        {\n            return _asyncPipelineCollection.Get(pipelineName);\n        }\n\n        /// <summary>\n        /// Gets a cancellable pipeline\n        /// </summary>\n        /// <param name=\"requestType\">Request Type</param>\n        /// <returns>Pipeline</returns>\n        public ICancellablePipelineAsync GetCancellablePipeline(Type requestType)\n        {\n            return _cancellablePipelineCollection.Get(requestType);\n        }\n\n        /// <summary>\n        /// Gets a cancellable pipeline\n        /// </summary>\n        /// <param name=\"pipelineName\">Pipeline Name</param>\n        /// <returns>Pipeline</returns>\n        public ICancellablePipelineAsync GetCancellablePipeline(string pipelineName)\n        {\n            return _cancellablePipelineCollection.Get(pipelineName);\n        }\n\n        /// <summary>\n        /// Gets a Pipeline\n        /// </summary>\n        /// <param name=\"requestType\">Request Type</param>\n        /// <returns>Pipeline</returns>\n        public IPipeline GetPipeline(Type requestType)\n        {\n            return _pipelineCollection.Get(requestType);\n        }\n\n        /// <summary>\n        /// Gets a Pipeline\n        /// </summary>\n        /// <param name=\"pipelineName\">Pipeline Name</param>\n        /// <returns>Pipeline</returns>\n        public IPipeline GetPipeline(string pipelineName)\n        {\n            return _pipelineCollection.Get(pipelineName);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/PipelineProviderBuilder.cs",
    "content": "using System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing FluentMediator.Pipelines;\nusing FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// PipelineProvider Builder\n    /// </summary>\n    public class PipelineProviderBuilder : IPipelineProviderBuilder\n    {\n        private ICollection<IPipelineBuilder> _pipelineBuilderCollection { get; }\n        private ICollection<IPipelineAsyncBuilder> _asyncPipelineBuilderCollection { get; }\n        private ICollection<ICancellablePipelineAsyncBuilder> _cancellablePipelineBuilderCollection { get; }\n\n        /// <summary>\n        /// Instantiate a PipelineProviderBuilder\n        /// </summary>\n        public PipelineProviderBuilder()\n        {\n            _pipelineBuilderCollection = new Collection<IPipelineBuilder>();\n            _asyncPipelineBuilderCollection = new Collection<IPipelineAsyncBuilder>();\n            _cancellablePipelineBuilderCollection = new Collection<ICancellablePipelineAsyncBuilder>();\n        }\n\n        /// <summary>\n        /// Returns a PipelineBehavior for a Message Type\n        /// </summary>\n        /// <typeparam name=\"TRequest\">MessageType</typeparam>\n        /// <returns>PipelineBehavior</returns>\n        public IPipelineBehavior<TRequest> On<TRequest>()\n        {\n            var behavior = new PipelineBehavior<TRequest>(this);\n            return behavior;\n        }\n\n        /// <summary>\n        /// Adds a Pipeline\n        /// </summary>\n        /// <param name=\"pipelineBuilder\">PipelineBuilder</param>\n        /// <returns>PipelineBuilder</returns>\n        public IPipelineBuilder Add(IPipelineBuilder pipelineBuilder)\n        {\n            _pipelineBuilderCollection.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n\n        /// <summary>\n        /// Adds a Pipeline\n        /// </summary>\n        /// <param name=\"pipelineBuilder\">PipelineBuilder</param>\n        /// <returns>PipelineBuilder</returns>\n        public IPipelineAsyncBuilder Add(IPipelineAsyncBuilder pipelineBuilder)\n        {\n            _asyncPipelineBuilderCollection.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n\n        /// <summary>\n        /// Adds a Pipeline\n        /// </summary>\n        /// <param name=\"pipelineBuilder\">PipelineBuilder</param>\n        /// <returns>PipelineBuilder</returns>\n        public ICancellablePipelineAsyncBuilder Add(ICancellablePipelineAsyncBuilder pipelineBuilder)\n        {\n            _cancellablePipelineBuilderCollection.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n\n        /// <summary>\n        /// Builds a PipelineProvider\n        /// </summary>\n        /// <returns>Returns a immutable PipelineProvider</returns>\n        public IPipelineProvider Build()\n        {\n            var pipelineCollection = new PipelineCollection<IPipeline>();\n            var asyncPipelineCollection = new PipelineCollection<IPipelineAsync>();\n            var cancellablePipelineCollection = new PipelineCollection<ICancellablePipelineAsync>();\n\n            foreach (var item in _pipelineBuilderCollection)\n            {\n                var pipeline = item.Build();\n                pipelineCollection.Add(pipeline);\n            }\n\n            foreach (var item in _asyncPipelineBuilderCollection)\n            {\n                var pipeline = item.Build();\n                asyncPipelineCollection.Add(pipeline);\n            }\n\n            foreach (var item in _cancellablePipelineBuilderCollection)\n            {\n                var pipeline = item.Build();\n                cancellablePipelineCollection.Add(pipeline);\n            }\n\n            return new PipelineProvider(\n                pipelineCollection,\n                asyncPipelineCollection,\n                cancellablePipelineCollection\n            );\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/Direct.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    internal sealed class Direct<TRequest, TResult, THandler> : IDirect\n    {\n        private readonly Method<Func<object, object, CancellationToken, Task<TResult>>> _method;\n\n        public Direct(Func<THandler, TRequest, CancellationToken, Task<TResult>> action)\n        {\n            Func<object, object, CancellationToken, Task<TResult>> typedHandler = (h, req, ct) => action((THandler) h, (TRequest) req, ct);\n            _method = new Method<Func<object, object, CancellationToken, Task<TResult>>>(typeof(THandler), typedHandler);\n        }\n\n        public async Task<TResponse> SendAsync<TResponse>(GetService getService, object request, CancellationToken cancellationToken)\n        {\n            var concreteHandler = getService(typeof(THandler));\n            Func<THandler, TRequest, CancellationToken, Task<TResponse>> typedHandler = (h, req, ct) => (Task<TResponse>) (object) _method.Action((THandler) concreteHandler, (TRequest) (object) request!, ct);\n            return await typedHandler((THandler) concreteHandler, (TRequest) (object) request!, cancellationToken);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/ICancellableMediator.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    /// <summary>\n    /// Cancellable Mediator\n    /// </summary>\n    public interface ICancellableMediator\n    {\n        /// <summary>\n        /// Publishes a message\n        /// </summary>\n        /// <param name=\"request\">A message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token</param>\n        /// <param name=\"pipelineName\">Pipeline Name</param>\n        /// <returns>Task object</returns>\n        Task PublishAsync(object request, CancellationToken cancellationToken, string? pipelineName = null);\n\n        /// <summary>\n        /// Sends a message\n        /// </summary>\n        /// <param name=\"request\">A message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token</param>\n        /// <param name=\"pipelineName\">Pipeline Name</param>\n        /// <typeparam name=\"TResult\">Result Type</typeparam>\n        /// <returns></returns>\n        Task<TResult> SendAsync<TResult>(object request, CancellationToken cancellationToken, string? pipelineName = null);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/ICancellablePipelineAsync.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    /// <summary>\n    /// Cancellable Pipeline\n    /// </summary>\n    public interface ICancellablePipelineAsync : INamedPipeline, ITypedPipeline\n    {\n        /// <summary>\n        /// Publishes a message\n        /// </summary>\n        /// <param name=\"getService\">Retriever a service from the container</param>\n        /// <param name=\"request\">Request message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token</param>\n        /// <returns>Task object</returns>\n        Task PublishAsync(GetService getService, object request, CancellationToken cancellationToken);\n\n        /// <summary>\n        /// Sends a message\n        /// </summary>\n        /// <param name=\"getService\">Retriever a service from the container</param>\n        /// <param name=\"request\">Request message</param>\n        /// <param name=\"cancellationToken\">Cancellation Token</param>\n        /// <typeparam name=\"TResult\">Message type</typeparam>\n        /// <returns>Response message</returns>\n        Task<TResult> SendAsync<TResult>(GetService getService, object request, CancellationToken cancellationToken);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/ICancellablePipelineAsyncBuilder.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    /// <summary>\n    /// Cancellable Pipeline\n    /// </summary>\n    /// <typeparam name=\"TRequest\"></typeparam>\n    public interface ICancellablePipelineAsyncBuilder<TRequest> : ICancellablePipelineAsyncBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"func\"></param>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        ICancellablePipelineAsyncBuilder<TRequest> Call<THandler>(Func<THandler, TRequest, CancellationToken, Task> func);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"func\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        ICancellablePipelineAsync Return<TResult, THandler>(Func<THandler, TRequest, CancellationToken, Task<TResult>> func);\n    }\n\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ICancellablePipelineAsyncBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <returns></returns>\n        ICancellablePipelineAsync Build();\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/ICancellablePipelineProvider.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ICancellablePipelineProvider\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"requestType\"></param>\n        /// <returns></returns>\n        ICancellablePipelineAsync GetCancellablePipeline(Type requestType);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineName\"></param>\n        /// <returns></returns>\n        ICancellablePipelineAsync GetCancellablePipeline(string pipelineName);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/ICancellablePipelineProviderBuilder.cs",
    "content": "namespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ICancellablePipelineProviderBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineBuilder\"></param>\n        /// <returns></returns>\n        ICancellablePipelineAsyncBuilder Add(ICancellablePipelineAsyncBuilder pipelineBuilder);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/IDirect.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    internal interface IDirect\n    {\n        Task<TResult> SendAsync<TResult>(\n            GetService getService,\n            object request,\n            CancellationToken cancellationToken\n        );\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/Pipeline.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    internal sealed class Pipeline : ICancellablePipelineAsync\n    {\n        private readonly IMethodCollection<Method<Func<object, object, CancellationToken, Task>>> _methods;\n        private readonly IDirect? _direct;\n\n        public Pipeline(IMethodCollection<Method<Func<object, object, CancellationToken, Task>>> methods,\n            IDirect? direct,\n            Type requestType,\n            string? name)\n        {\n            _methods = methods;\n            _direct = direct;\n            RequestType = requestType;\n            Name = name;\n        }\n\n        public Type RequestType { get; }\n        public string? Name { get; }\n\n        public async Task PublishAsync(GetService getService, object request, CancellationToken cancellationToken)\n        {\n            foreach (var handler in _methods.GetMethods())\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n\n                var concreteHandler = getService(handler.HandlerType);\n                await handler.Action(concreteHandler, request, cancellationToken);\n            }\n        }\n\n        public async Task<TResult> SendAsync<TResult>(GetService getService, object request, CancellationToken cancellationToken)\n        {\n            if (_direct is null)\n            {\n                throw new ReturnFunctionIsNullException(\"The return function is null. SendAsync<TResult> method not executed.\");\n            }\n\n            foreach (var handler in _methods.GetMethods())\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n\n                var concreteHandler = getService(handler.HandlerType);\n                await handler.Action(concreteHandler, request, cancellationToken);\n            }\n\n            cancellationToken.ThrowIfCancellationRequested();\n\n            return await _direct.SendAsync<TResult>(getService, request!, cancellationToken) !;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/CancellablePipelineAsync/PipelineBuilder.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.CancellablePipelineAsync\n{\n    internal class PipelineBuilder<TRequest> : ICancellablePipelineAsyncBuilder<TRequest>\n    {\n        private readonly IMethodCollection<Method<Func<object, object, CancellationToken, Task>>> _methods;\n        private IDirect? _direct;\n        private string? _name;\n\n        public PipelineBuilder(string? name)\n        {\n            _methods = new MethodCollection<Method<Func<object, object, CancellationToken, Task>>>();\n            _name = name;\n        }\n\n        public ICancellablePipelineAsyncBuilder<TRequest> Call<THandler>(Func<THandler, TRequest, CancellationToken, Task> func)\n        {\n            Func<object, object, CancellationToken, Task> typedHandler = async(h, r, c) => await func((THandler) h, (TRequest) r, c);\n            var method = new Method<Func<object, object, CancellationToken, Task>>(typeof(THandler), typedHandler);\n            _methods.Add(method);\n            return this;\n        }\n\n        public ICancellablePipelineAsync Return<TResult, THandler>(Func<THandler, TRequest, CancellationToken, Task<TResult>> func)\n        {\n            _direct = new Direct<TRequest, TResult, THandler>(func);\n            return Build();\n        }\n\n        public ICancellablePipelineAsync Build()\n        {\n            return new Pipeline(_methods, _direct, typeof(TRequest), _name);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/IMethodCollection.cs",
    "content": "using System.Collections.ObjectModel;\n\nnamespace FluentMediator.Pipelines\n{\n    internal interface IMethodCollection<Method>\n    {\n        ReadOnlyCollection<Method> GetMethods();\n        void Add(Method method);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/INamedPipeline.cs",
    "content": "namespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// Named Pipeline\n    /// </summary>\n    public interface INamedPipeline\n    {\n        /// <summary>\n        /// An unique pipeline name\n        /// </summary>\n        /// <value>null</value>\n        string? Name { get; }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/IPipelineBehavior.cs",
    "content": "using FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// PipelineBehavior\n    /// </summary>\n    /// <typeparam name=\"TRequest\"></typeparam>\n    public interface IPipelineBehavior<TRequest>\n    {\n        /// <summary>\n        /// Creates a IPipelineBuilder\n        /// </summary>\n        /// <param name=\"pipelineName\">An unique name or null</param>\n        /// <returns>IPipelineBuilder</returns>\n        IPipelineBuilder<TRequest> Pipeline(string? pipelineName = null);\n\n        /// <summary>\n        /// Creates an IPipelineAsyncBuilder\n        /// </summary>\n        /// <param name=\"pipelineName\">An unique name or null</param>\n        /// <returns>IPipelineAsyncBuilder</returns>\n        IPipelineAsyncBuilder<TRequest> PipelineAsync(string? pipelineName = null);\n\n        /// <summary>\n        /// Creates an ICancellablePipelineAsyncBuilder\n        /// </summary>\n        /// <param name=\"pipelineName\">An unique name or null</param>\n        /// <returns>ICancellablePipelineAsyncBuilder</returns>\n        ICancellablePipelineAsyncBuilder<TRequest> CancellablePipelineAsync(string? pipelineName = null);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/IPipelineCollection.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines\n{\n    internal interface IPipelineCollection<TPipeline> where TPipeline : class, ITypedPipeline\n    {\n        void Add(TPipeline pipeline);\n        TPipeline Get(Type requestType);\n        TPipeline Get(string pipelineName);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/ITypedPipeline.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// A Typed Pipeline\n    /// </summary>\n    public interface ITypedPipeline\n    {\n        /// <summary>\n        /// A RequestType\n        /// </summary>\n        /// <value></value>\n        Type RequestType { get; }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Method.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines\n{\n    internal sealed class Method<TAction>\n    {\n        public Type HandlerType { get; }\n        public TAction Action { get; }\n\n        public Method(Type handlerType, TAction action)\n        {\n            HandlerType = handlerType;\n            Action = action;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/MethodCollection.cs",
    "content": "using System.Collections.Generic;\nusing System.Collections.ObjectModel;\n\nnamespace FluentMediator.Pipelines\n{\n    internal sealed class MethodCollection<Method> : IMethodCollection<Method>\n    {\n        private readonly IList<Method> _asyncMethods;\n\n        public MethodCollection()\n        {\n            _asyncMethods = new List<Method>();\n        }\n\n        public ReadOnlyCollection<Method> GetMethods()\n        {\n            return new ReadOnlyCollection<Method>(_asyncMethods);\n        }\n\n        public void Add(Method method)\n        {\n            _asyncMethods.Add(method);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/Direct.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.Pipeline\n{\n    internal sealed class Direct<TRequest, TResult, THandler> : IDirect\n    {\n        private readonly Method<Func<object, object, TResult>> _method;\n\n        public Direct(Func<THandler, TRequest, TResult> action)\n        {\n            Func<object, object, TResult> typedHandler = (h, req) => action((THandler) h, (TRequest) req);\n            _method = new Method<Func<object, object, TResult>>(typeof(THandler), typedHandler);\n        }\n\n        public TResponse Send<TResponse>(GetService getService, object request)\n        {\n            var concreteHandler = getService(_method.HandlerType);\n            return (TResponse) (object) _method.Action((THandler) concreteHandler, (TRequest) request) !;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/IDirect.cs",
    "content": "namespace FluentMediator.Pipelines.Pipeline\n{\n    internal interface IDirect\n    {\n        TResult Send<TResult>(\n            GetService getService,\n            object request\n        );\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/IPipeline.cs",
    "content": "namespace FluentMediator.Pipelines.Pipeline\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IPipeline : INamedPipeline, ITypedPipeline\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"getService\"></param>\n        /// <param name=\"request\"></param>\n        void Publish(GetService getService, object request);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"getService\"></param>\n        /// <param name=\"request\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <returns></returns>\n        TResult Send<TResult>(GetService getService, object request);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/IPipelineBuilder.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.Pipeline\n{\n    /// <summary>\n    /// \n    /// </summary>\n    /// <typeparam name=\"TRequest\"></typeparam>\n    public interface IPipelineBuilder<TRequest> : IPipelineBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"action\"></param>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        IPipelineBuilder<TRequest> Call<THandler>(Action<THandler, TRequest> action);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"func\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        IPipeline Return<TResult, THandler>(Func<THandler, TRequest, TResult> func);\n    }\n\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IPipelineBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <returns></returns>\n        IPipeline Build();\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/ISyncMediator.cs",
    "content": "namespace FluentMediator.Pipelines.Pipeline\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ISyncMediator\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"request\"></param>\n        /// <param name=\"pipelineName\"></param>\n        void Publish(object request, string? pipelineName = null);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"request\"></param>\n        /// <param name=\"pipelineName\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <returns></returns>\n        TResult Send<TResult>(object request, string? pipelineName = null);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/ISyncPipelineProvider.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.Pipeline\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ISyncPipelineProvider\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"requestType\"></param>\n        /// <returns></returns>\n        IPipeline GetPipeline(Type requestType);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineName\"></param>\n        /// <returns></returns>\n        IPipeline GetPipeline(string pipelineName);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/ISyncPipelineProviderBuilder.cs",
    "content": "namespace FluentMediator.Pipelines.Pipeline\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface ISyncPipelineProviderBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineBuilder\"></param>\n        /// <returns></returns>\n        IPipelineBuilder Add(IPipelineBuilder pipelineBuilder);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/Pipeline.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.Pipeline\n{\n    internal sealed class Pipeline : IPipeline\n    {\n        private readonly IMethodCollection<Method<Action<object, object>>> _methods;\n        private readonly IDirect? _direct;\n\n        public Pipeline(IMethodCollection<Method<Action<object, object>>> methods, IDirect? direct, Type requestType, string? name)\n        {\n            _methods = methods;\n            _direct = direct;\n            RequestType = requestType;\n            Name = name;\n        }\n\n        public Type RequestType { get; }\n        public string? Name { get; }\n\n        public void Publish(GetService getService, object request)\n        {\n            foreach (var handler in _methods.GetMethods())\n            {\n                var concreteHandler = getService(handler.HandlerType);\n                handler.Action(concreteHandler, request);\n            }\n        }\n\n        public TResult Send<TResult>(GetService getService, object request)\n        {\n            if (_direct is null)\n            {\n                throw new ReturnFunctionIsNullException(\"The return function is null. Send<TResult> method not executed.\");\n            }\n\n            foreach (var handler in _methods.GetMethods())\n            {\n                var concreteHandler = getService(handler.HandlerType);\n                handler.Action(concreteHandler, request);\n            }\n\n            return _direct.Send<TResult>(getService, request!) !;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/Pipeline/PipelineBuilder.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.Pipeline\n{\n    internal sealed class PipelineBuilder<TRequest> : IPipelineBuilder<TRequest>\n    {\n        private readonly IMethodCollection<Method<Action<object, object>>> _methods;\n        private IDirect? _direct;\n        private string? _name;\n\n        public PipelineBuilder(string? name)\n        {\n            _methods = new MethodCollection<Method<Action<object, object>>>();\n            _name = name;\n        }\n\n        public IPipelineBuilder<TRequest> Call<THandler>(Action<THandler, TRequest> action)\n        {\n            Action<object, object> typedHandler = (h, r) => action((THandler) h, (TRequest) r);\n            var method = new Method<Action<object, object>>(typeof(THandler), typedHandler);\n            _methods.Add(method);\n            return this;\n        }\n\n        public IPipeline Return<TResult, THandler>(Func<THandler, TRequest, TResult> func)\n        {\n            _direct = new Direct<TRequest, TResult, THandler>(func);\n            return Build();\n        }\n\n        public IPipeline Build()\n        {\n            return new Pipeline(_methods, _direct, typeof(TRequest), _name);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAlreadyExistsException.cs",
    "content": "namespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// Occurs when pipelines have the same name\n    /// </summary>\n    public sealed class PipelineAlreadyExistsException : MediatorException\n    {\n        /// <summary>\n        /// Instantiate an PipelineAlreadyExistsException\n        /// </summary>\n        /// <param name=\"message\">Message</param>\n        /// <returns>PipelineAlreadyExistsException</returns>\n        public PipelineAlreadyExistsException(string message) : base(message) { }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/Direct.cs",
    "content": "using System;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    internal sealed class Direct<TRequest, TResult, THandler> : IDirect\n    {\n        private readonly Method<Func<object, object, Task<TResult>>> _method;\n\n        public Direct(Func<THandler, TRequest, Task<TResult>> action)\n        {\n            Func<object, object, Task<TResult>> typedHandler = (h, req) => action((THandler) h, (TRequest) req);\n            _method = new Method<Func<object, object, Task<TResult>>>(typeof(THandler), typedHandler);\n        }\n\n        public async Task<TResponse> SendAsync<TResponse>(GetService getService, object request)\n        {\n            var concreteHandler = getService(typeof(THandler));\n            Func<THandler, TRequest, Task<TResponse>> typedHandler = (h, req) => (Task<TResponse>) (object) _method.Action((THandler) concreteHandler, (TRequest) (object) request!);\n            return await typedHandler((THandler) concreteHandler, (TRequest) (object) request!);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IAsyncMediator.cs",
    "content": "using System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IAsyncMediator\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"request\"></param>\n        /// <param name=\"pipelineName\"></param>\n        /// <returns></returns>\n        Task PublishAsync(object request, string? pipelineName = null);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"request\"></param>\n        /// <param name=\"pipelineName\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <returns></returns>\n        Task<TResult> SendAsync<TResult>(object request, string? pipelineName = null);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IAsyncPipelineProvider.cs",
    "content": "using System;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IAsyncPipelineProvider\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"requestType\"></param>\n        /// <returns></returns>\n        IPipelineAsync GetAsyncPipeline(Type requestType);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineName\"></param>\n        /// <returns></returns>\n        IPipelineAsync GetAsyncPipeline(string pipelineName);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IAsyncPipelineProviderBuilder.cs",
    "content": "namespace FluentMediator.Pipelines.PipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IAsyncPipelineProviderBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"pipelineBuilder\"></param>\n        /// <returns></returns>\n        IPipelineAsyncBuilder Add(IPipelineAsyncBuilder pipelineBuilder);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IDirect.cs",
    "content": "using System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    internal interface IDirect\n    {\n        Task<TResult> SendAsync<TResult>(\n            GetService getService,\n            object request\n        );\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IPipelineAsync.cs",
    "content": "using System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IPipelineAsync : INamedPipeline, ITypedPipeline\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"getService\"></param>\n        /// <param name=\"request\"></param>\n        /// <returns></returns>\n        Task PublishAsync(GetService getService, object request);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"getService\"></param>\n        /// <param name=\"request\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <returns></returns>\n        Task<TResult> SendAsync<TResult>(GetService getService, object request);\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/IPipelineAsyncBuilder.cs",
    "content": "using System;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    /// <summary>\n    /// \n    /// </summary>\n    /// <typeparam name=\"TRequest\"></typeparam>\n    public interface IPipelineAsyncBuilder<TRequest> : IPipelineAsyncBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"func\"></param>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        IPipelineAsyncBuilder<TRequest> Call<THandler>(Func<THandler, TRequest, Task> func);\n\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"func\"></param>\n        /// <typeparam name=\"TResult\"></typeparam>\n        /// <typeparam name=\"THandler\"></typeparam>\n        /// <returns></returns>\n        IPipelineAsync Return<TResult, THandler>(Func<THandler, TRequest, Task<TResult>> func);\n    }\n\n    /// <summary>\n    /// \n    /// </summary>\n    public interface IPipelineAsyncBuilder\n    {\n        /// <summary>\n        /// \n        /// </summary>\n        /// <returns></returns>\n        IPipelineAsync Build();\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/Pipeline.cs",
    "content": "using System;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    internal sealed class Pipeline : IPipelineAsync\n    {\n        private readonly IMethodCollection<Method<Func<object, object, Task>>> _methods;\n        private readonly IDirect? _direct;\n\n        public Pipeline(IMethodCollection<Method<Func<object, object, Task>>> methods, IDirect? direct, Type requestType, string? name)\n        {\n            _methods = methods;\n            _direct = direct;\n            RequestType = requestType;\n            Name = name;\n        }\n\n        public Type RequestType { get; }\n        public string? Name { get; }\n\n        public async Task PublishAsync(GetService getService, object request)\n        {\n            foreach (var handler in _methods.GetMethods())\n            {\n                var concreteHandler = getService(handler.HandlerType);\n                await handler.Action(concreteHandler, request);\n            }\n        }\n\n        public async Task<TResult> SendAsync<TResult>(GetService getService, object request)\n        {\n            if (_direct is null)\n            {\n                throw new ReturnFunctionIsNullException(\"The return function is null. SendAsync<TResult> method not executed.\");\n            }\n\n            foreach (var handler in _methods.GetMethods())\n            {\n                var concreteHandler = getService(handler.HandlerType);\n                await handler.Action(concreteHandler, request);\n            }\n\n            return await _direct.SendAsync<TResult>(getService, request!) !;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineAsync/PipelineBuilder.cs",
    "content": "using System;\nusing System.Threading.Tasks;\n\nnamespace FluentMediator.Pipelines.PipelineAsync\n{\n    internal sealed class PipelineBuilder<TRequest> : IPipelineAsyncBuilder<TRequest>\n    {\n        private readonly IMethodCollection<Method<Func<object, object, Task>>> _methods;\n        private IDirect? _direct;\n        private string? _name;\n\n        public PipelineBuilder(string? name)\n        {\n            _methods = new MethodCollection<Method<Func<object, object, Task>>>();\n            _name = name;\n        }\n\n        public IPipelineAsyncBuilder<TRequest> Call<THandler>(Func<THandler, TRequest, Task> func)\n        {\n            Func<object, object, Task> typedHandler = async(h, r) => await func((THandler) h, (TRequest) r);\n            var method = new Method<Func<object, object, Task>>(typeof(THandler), typedHandler);\n            _methods.Add(method);\n            return this;\n        }\n\n        public IPipelineAsync Return<TResult, THandler>(Func<THandler, TRequest, Task<TResult>> func)\n        {\n            _direct = new Direct<TRequest, TResult, THandler>(func);\n            return Build();\n        }\n\n        public IPipelineAsync Build()\n        {\n            return new Pipeline(_methods, _direct, typeof(TRequest), _name);\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineBehavior.cs",
    "content": "using FluentMediator.Pipelines.CancellablePipelineAsync;\nusing FluentMediator.Pipelines.Pipeline;\nusing FluentMediator.Pipelines.PipelineAsync;\n\nnamespace FluentMediator.Pipelines\n{\n    internal sealed class PipelineBehavior<TRequest> : IPipelineBehavior<TRequest>\n    {\n        private readonly IPipelineProviderBuilder _pipelineProviderBuilder;\n\n        public PipelineBehavior(IPipelineProviderBuilder pipelineProviderBuilder)\n        {\n            _pipelineProviderBuilder = pipelineProviderBuilder;\n        }\n\n        public IPipelineBuilder<TRequest> Pipeline(string? pipelineName = null)\n        {\n            var pipelineBuilder = new Pipeline.PipelineBuilder<TRequest>(pipelineName);\n            _pipelineProviderBuilder.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n\n        public IPipelineAsyncBuilder<TRequest> PipelineAsync(string? pipelineName = null)\n        {\n            var pipelineBuilder = new PipelineAsync.PipelineBuilder<TRequest>(pipelineName);\n            _pipelineProviderBuilder.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n\n        public ICancellablePipelineAsyncBuilder<TRequest> CancellablePipelineAsync(string? pipelineName = null)\n        {\n            var pipelineBuilder = new CancellablePipelineAsync.PipelineBuilder<TRequest>(pipelineName);\n            _pipelineProviderBuilder.Add(pipelineBuilder);\n            return pipelineBuilder;\n        }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineCollection.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace FluentMediator.Pipelines\n{\n    internal sealed class PipelineCollection<TPipeline> : IPipelineCollection<TPipeline>\n        where TPipeline : class, ITypedPipeline, INamedPipeline\n        {\n            private readonly IDictionary<Type, TPipeline> _typedPipelines;\n            private readonly IDictionary<string, TPipeline> _namedPipelines;\n\n            public PipelineCollection()\n            {\n                _typedPipelines = new Dictionary<Type, TPipeline>();\n                _namedPipelines = new Dictionary<string, TPipeline>();\n            }\n\n            public void Add(TPipeline pipeline)\n            {\n                if (pipeline.Name is string)\n                {\n                    _namedPipelines.Add(pipeline.Name, pipeline);\n                }\n                else\n                {\n                    if (_typedPipelines.ContainsKey(pipeline.RequestType))\n                    {\n                        throw new PipelineAlreadyExistsException($\"A pipeline for `{ pipeline.RequestType }` already exists.\");\n                    }\n                    _typedPipelines.Add(pipeline.RequestType, pipeline);\n                }\n            }\n\n            public TPipeline Get(Type requestType)\n            {\n                if (_typedPipelines.TryGetValue(requestType, out var pipeline))\n                {\n                    return pipeline;\n                }\n\n                throw new PipelineNotFoundException($\"There is no pipeline configured for `{ requestType.GetType() }`.\");\n            }\n\n            public TPipeline Get(string pipelineName)\n            {\n                if (_namedPipelines.TryGetValue(pipelineName, out var pipeline))\n                {\n                    return pipeline;\n                }\n\n                throw new PipelineNotFoundException($\"There is no pipeline configured for `{ pipelineName }`.\");\n            }\n        }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/PipelineNotFoundException.cs",
    "content": "namespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// Occurs when a pipeline for a message was not found\n    /// </summary>\n    internal sealed class PipelineNotFoundException : MediatorException\n    {\n        /// <summary>\n        /// Instantiate a PipelineNotFoundException\n        /// </summary>\n        /// <param name=\"message\">The message</param>\n        /// <returns>PipelineNotFoundException</returns>\n        public PipelineNotFoundException(string message) : base(message) { }\n    }\n}"
  },
  {
    "path": "src/FluentMediator/Pipelines/ReturnFunctionIsNullException.cs",
    "content": "namespace FluentMediator.Pipelines\n{\n    /// <summary>\n    /// Occurs when a return function was not defined\n    /// </summary>\n    public sealed class ReturnFunctionIsNullException : MediatorException\n    {\n        /// <summary>\n        /// Instantiate the Exception\n        /// </summary>\n        /// <param name=\"message\">Exception Message</param>\n        /// <returns>An exception</returns>\n        public ReturnFunctionIsNullException(string message) : base(message) { }\n    }\n}"
  },
  {
    "path": "src/FluentMediator.Microsoft.Extensions.DependencyInjection/FluentMediator.Microsoft.Extensions.DependencyInjection.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netstandard1.1</TargetFramework>\r\n    <DocumentationFile>bin\\$(Configuration)\\$(TargetFramework)\\$(AssemblyName).xml</DocumentationFile>\r\n  </PropertyGroup>\r\n  \r\n  <PropertyGroup>\r\n    <PackageId>FluentMediator.Microsoft.Extensions.DependencyInjection</PackageId>\r\n    <Version>0.4.7</Version>\r\n    <Authors>Ivan Paulovich</Authors>\r\n    <Copyright>Ivan Paulovich</Copyright>\r\n    <Description>Microsoft Extensions for FluentMediator.</Description>\r\n    <PackageDescription>Microsoft Extensions for FluentMediator.</PackageDescription>\r\n    <PackageTags>fluent-design;mediator-pattern;ddd-cqrs;message-bus;event-sourcing;event-driven;chain-of-responsibility;chain-methods;pipelines;dotnet-core;craftmanship;tdd;csharp;pipeline-framework;fluent-interface;event-handlers</PackageTags>\r\n    <IsPackable>true</IsPackable>\r\n    <PackageIcon>icon.png</PackageIcon>\r\n    <RepositoryUrl>https://github.com/ivanpaulovich/FluentMediator</RepositoryUrl>\r\n    <NeutralLanguage>en-US</NeutralLanguage>\r\n\t</PropertyGroup>\r\n\r\n  <ItemGroup Label=\"SourceLink\">\r\n    <PackageReference Include=\"Microsoft.SourceLink.GitHub\" Version=\"1.0.0\" PrivateAssets=\"All\" />\r\n  </ItemGroup>\r\n\r\n  <PropertyGroup Label=\"SourceLink\">\r\n    <PublishRepositoryUrl>true</PublishRepositoryUrl>\r\n    <IncludeSymbols>true</IncludeSymbols>\r\n    <SymbolPackageFormat>snupkg</SymbolPackageFormat>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\FluentMediator\\FluentMediator.csproj\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"1.1.0\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <None Include=\"../../docs/icon.png\">\r\n      <Pack>True</Pack>\r\n      <PackagePath></PackagePath>\r\n    </None>\r\n  </ItemGroup>\r\n\r\n</Project>\r\n"
  },
  {
    "path": "src/FluentMediator.Microsoft.Extensions.DependencyInjection/FluentMediatorExtensions.cs",
    "content": "using System;\nusing Microsoft.Extensions.DependencyInjection;\n\nnamespace FluentMediator\n{\n    /// <summary>\n    /// FluentMediatorExtensions\n    /// </summary>\n    public static class FluentMediatorExtensions\n    {\n        /// <summary>\n        /// Adds the FluentMediator\n        /// </summary>\n        /// <param name=\"services\">The ServiceCollection</param>\n        /// <param name=\"setupAction\">Builder</param>\n        /// <returns>The changed ServiceCollection</returns>\n        public static IServiceCollection AddFluentMediator<TMediator>(\n            this IServiceCollection services,\n            Action<IPipelineProviderBuilder> setupAction)\n        where TMediator : class, IMediator\n        {\n            var pipelineProviderBuilder = new PipelineProviderBuilder();\n            setupAction(pipelineProviderBuilder);\n            var pipelineProvider = pipelineProviderBuilder.Build();\n\n            services.AddTransient<GetService>(c => c.GetService);\n            services.AddTransient(c => pipelineProvider);\n            services.AddTransient<IMediator, TMediator>();\n\n            return services;\n        }\n\n        /// <summary>\n        /// Adds the FluentMediator\n        /// </summary>\n        /// <param name=\"services\">The ServiceCollection</param>\n        /// <param name=\"setupAction\">Builder</param>\n        /// <returns>The changed ServiceCollection</returns>\n        public static IServiceCollection AddFluentMediator(this IServiceCollection services, Action<IPipelineProviderBuilder> setupAction)\n        {\n            var pipelineProviderBuilder = new PipelineProviderBuilder();\n            setupAction(pipelineProviderBuilder);\n            var pipelineProvider = pipelineProviderBuilder.Build();\n\n            services.AddTransient<GetService>(c => c.GetService);\n            services.AddTransient(c => pipelineProvider);\n            services.AddTransient<IMediator, Mediator>();\n\n            return services;\n        }\n\n        /// <summary>\n        /// Adds the FluentMediator\n        /// </summary>\n        /// <param name=\"services\">The ServiceCollection</param>\n        /// <param name=\"setupAction\">Builder</param>\n        /// <returns>The changed ServiceCollection</returns>\n        public static IServiceCollection AddSingletonFluentMediator(\n            this IServiceCollection services,\n            Action<IPipelineProviderBuilder> setupAction)\n        {\n            var pipelineProviderBuilder = new PipelineProviderBuilder();\n            setupAction(pipelineProviderBuilder);\n            var pipelineProvider = pipelineProviderBuilder.Build();\n\n            services.AddSingleton(c => pipelineProvider);\n            services.AddSingleton<GetService>(c => c.GetService);\n            services.AddSingleton<IMediator, Mediator>();\n\n            return services;;\n        }\n\n        /// <summary>\n        /// Adds the FluentMediator\n        /// </summary>\n        /// <param name=\"services\">The ServiceCollection</param>\n        /// <param name=\"setupAction\">Builder</param>\n        /// <returns>The changed ServiceCollection</returns>\n        public static IServiceCollection AddScopedFluentMediator(\n            this IServiceCollection services,\n            Action<IPipelineProviderBuilder> setupAction)\n        {\n            var pipelineProviderBuilder = new PipelineProviderBuilder();\n            setupAction(pipelineProviderBuilder);\n            var pipelineProvider = pipelineProviderBuilder.Build();\n\n            services.AddScoped(c => pipelineProvider);\n            services.AddScoped<GetService>(c => c.GetService);\n            services.AddScoped<IMediator, Mediator>();\n\n            return services;\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/BuildingMediatorTests.cs",
    "content": "using System;\nusing FluentMediator;\nusing FluentMediator.Pipelines;\nusing Microsoft.Extensions.DependencyInjection;\nusing UnitTests.PingPong;\nusing Xunit;\n\nnamespace UnitTests\n{\n    public class BuildingMediatorTests\n    {\n        [Fact]\n        public void BuildSendAsyncPipeline_ThrowsPipelineAlreadyExistsException()\n        {\n            var services = new ServiceCollection();\n\n            var pipelineProviderBuilder = new PipelineProviderBuilder();\n\n            pipelineProviderBuilder.On<PingRequest>().PipelineAsync()\n                .Return<PingResponse, IPingHandler>(\n                    (handler, req) => handler.MyCustomFooBarAsync(req)\n                );\n\n            pipelineProviderBuilder.On<PingRequest>().PipelineAsync()\n                .Return<PingResponse, IPingHandler>(\n                    (handler, req) => handler.MyCustomFooBarAsync(req)\n                );\n\n            Exception ex = Record.Exception(() => pipelineProviderBuilder.Build());\n\n            Assert.NotNull(ex);\n            Assert.IsType<PipelineAlreadyExistsException>(ex);\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/MyCustomMediator.cs",
    "content": "using FluentMediator;\n\nnamespace UnitTests\n{\n    public class MyCustomMediator : Mediator\n    {\n        public bool MyCustomPipelineNotFoundHandlerWasCalled = false;\n\n        public MyCustomMediator(GetService getService, IPipelineProvider pipelines) : base(getService, pipelines)\n        { }\n\n        protected override void OnPipelineNotFound(PipelineNotFoundEventArgs e)\n        {\n            MyCustomPipelineNotFoundHandlerWasCalled = true;\n\n            //Do something before raising the event\n            base.OnPipelineNotFound(e);\n            //Do something after raising the event \n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/PingPong/IPingHandler.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace UnitTests.PingPong\n{\n    public interface IPingHandler\n    {\n        PingResponse MyCustomFooMethod(PingRequest request);\n        PingResponse MyCustomBarMethod(PingRequest request);\n        Task<PingResponse> MyCustomFooBarAsync(PingRequest request);\n        Task<PingResponse> MyCancellableForAsync(PingRequest request, CancellationToken cancelationToken);\n    }\n}"
  },
  {
    "path": "test/UnitTests/PingPong/PingHandler.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace UnitTests.PingPong\n{\n    public class PingHandler : IPingHandler\n    {\n        public PingResponse MyCustomBarMethod(PingRequest request)\n        {\n            return new PingResponse(\"Pong\");\n        }\n\n        public PingResponse MyCustomFooMethod(PingRequest request)\n        {\n            return new PingResponse(\"Pong\");\n        }\n\n        public Task<PingResponse> MyCustomFooBarAsync(PingRequest request)\n        {\n            return Task.FromResult(new PingResponse(\"Pong\"));\n        }\n\n        public Task<PingResponse> MyCancellableForAsync(PingRequest request, CancellationToken cancelationToken)\n        {\n            return Task.FromResult(new PingResponse(\"Pong\"));\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/PingPong/PingRequest.cs",
    "content": "namespace UnitTests.PingPong\n{\n    public class PingRequest\n    {\n        public string Message { get; }\n\n        public PingRequest(string message)\n        {\n            Message = message;\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/PingPong/PingResponse.cs",
    "content": "namespace UnitTests.PingPong\n{\n    public class PingResponse\n    {\n        public string Message { get; }\n\n        public PingResponse(string message)\n        {\n            Message = message;\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/PublishingRequestsTests.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\nusing FluentMediator;\nusing Microsoft.Extensions.DependencyInjection;\nusing Moq;\nusing UnitTests.PingPong;\nusing Xunit;\n\nnamespace UnitTests\n{\n    public sealed class PublishingRequestsTests\n    {\n        [Fact]\n        public void Publish_Calls_Pipeline_Handlers()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(builder =>\n            {\n                builder.On<PingRequest>().Pipeline()\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomFooMethod(req))\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomBarMethod(req));\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n\n            //\n            // Act\n            //\n            mediator.Publish(ping);\n\n            pingHandler.Verify(e => e.MyCustomFooMethod(ping), Times.Once);\n            pingHandler.Verify(e => e.MyCustomBarMethod(ping), Times.Once);\n        }\n\n        [Fact]\n        public async Task PublishAsync_Calls_AsyncPipeline_Handlers()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(builder =>\n            {\n                builder.On<PingRequest>().PipelineAsync()\n                    .Call<IPingHandler>(async(handler, req) => await handler.MyCustomFooBarAsync(req))\n                    .Build();\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Async Ping\");\n\n            //\n            // Act\n            //\n            await mediator.PublishAsync(ping);\n\n            pingHandler.Verify(e => e.MyCustomFooBarAsync(ping), Times.Once);\n        }\n\n        [Fact]\n        public async Task PublishAsync_Calls_CancellablePipeline_Handlers()\n        {\n\n            var services = new ServiceCollection();\n            services.AddFluentMediator(builder =>\n            {\n                builder.On<PingRequest>().CancellablePipelineAsync()\n                    .Call<IPingHandler>(async(handler, req, ct) => await handler.MyCancellableForAsync(req, ct))\n                    .Build();\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var cts = new CancellationTokenSource();\n            var ping = new PingRequest(\"Cancellable Async Ping\");\n\n            //\n            // Act\n            //\n            await mediator.PublishAsync(ping, cts.Token);\n\n            pingHandler.Verify(e => e.MyCancellableForAsync(ping, It.IsAny<CancellationToken>()), Times.Once);\n        }\n\n        [Fact]\n        public async Task PublishAsync_Calls_CancellablePipeline_Handlers2()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(builder =>\n            {\n                builder.On<PingRequest>().CancellablePipelineAsync()\n                    .Call<IPingHandler>(async(handler, req, ct) => await handler.MyCancellableForAsync(req, ct))\n                    .Return<PingResponse, IPingHandler>(\n                        async(handler, req, ct) => await handler.MyCancellableForAsync(req, ct)\n                    );\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var cts = new CancellationTokenSource();\n            var ping = new PingRequest(\"Cancellable Async Ping\");\n\n            //\n            // Act\n            //\n            await mediator.PublishAsync(ping, cts.Token);\n\n            pingHandler.Verify(e => e.MyCancellableForAsync(ping, It.IsAny<CancellationToken>()), Times.Once);\n        }\n\n        [Fact]\n        public void Publish_CallsPipelineNotFound_WhenHandlerIsNotSetup()\n        {\n            var services = new ServiceCollection();\n            // Mediator Without the Handler for PingRequest.\n            services.AddFluentMediator(builder => { });\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            bool myCustomPipelineNotFoundHandlerWasCalled = false;\n\n            // This is handler is called for every message without a destination pipeline.\n            mediator.PipelineNotFound += (object sender, PipelineNotFoundEventArgs e) =>\n            {\n                myCustomPipelineNotFoundHandlerWasCalled = true;\n            };\n\n            var cts = new CancellationTokenSource();\n            var ping = new PingRequest(\"Cancellable Async Ping\");\n\n            // Should run without throwing exceptions\n            mediator.Publish(ping);\n\n            // The method was called :)\n            Assert.True(myCustomPipelineNotFoundHandlerWasCalled);\n        }\n\n        [Fact]\n        public void Publish_CallsCustomPipelineNotFound_WhenHandlerIsNotSetup()\n        {\n            var services = new ServiceCollection();\n\n            // Mediator Without the Handler for PingRequest.\n            services.AddFluentMediator<MyCustomMediator>(builder => { });\n\n            var provider = services.BuildServiceProvider();\n            var mediator = (MyCustomMediator) provider.GetRequiredService<IMediator>();\n\n            var cts = new CancellationTokenSource();\n            var ping = new PingRequest(\"Cancellable Async Ping\");\n\n            // Should run without throwing exceptions\n            mediator.Publish(ping);\n\n            // The method was called :)\n            Assert.True(mediator.MyCustomPipelineNotFoundHandlerWasCalled);\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/SendingRequestTests.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\nusing FluentMediator;\nusing FluentMediator.Pipelines;\nusing Microsoft.Extensions.DependencyInjection;\nusing Moq;\nusing UnitTests.PingPong;\nusing Xunit;\n\nnamespace UnitTests\n{\n    public class SendingRequestTests\n    {\n        [Fact]\n        public void Send_Without_Return_Throws_ReturnFunctionIsNullException()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>().Pipeline()\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomFooMethod(req))\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomBarMethod(req));\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n\n            var actualEx = Record.Exception(\n                //\n                // Act\n                //\n                () => mediator.Send<PingResponse>(ping)\n            );\n\n            Assert.IsType<ReturnFunctionIsNullException>(actualEx);\n        }\n\n        [Fact]\n        public void SendAsync_Without_Return_Throws_ReturnFunctionIsNullException()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>().PipelineAsync()\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomFooBarAsync(req))\n                    .Call<IPingHandler>((handler, req) => handler.MyCustomFooBarAsync(req));\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped<IPingHandler>(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n\n            var actualEx = Record.ExceptionAsync(\n                //\n                // Act\n                //\n                async() => await mediator.SendAsync<PingResponse>(ping)\n            );\n\n            Assert.IsType<ReturnFunctionIsNullException>(actualEx.Result);\n\n            pingHandler.Verify(e => e.MyCustomFooMethod(ping), Times.Never);\n            pingHandler.Verify(e => e.MyCustomBarMethod(ping), Times.Never);\n        }\n\n        [Fact]\n        public void CancellableSendAsync_Without_Return_Throws_ReturnFunctionIsNullException()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>().CancellablePipelineAsync()\n                    .Call<IPingHandler>((handler, req, ct) => handler.MyCancellableForAsync(req, ct))\n                    .Call<IPingHandler>((handler, req, ct) => handler.MyCancellableForAsync(req, ct));\n            });\n            var pingHandler = new Mock<IPingHandler>();\n            services.AddScoped<IPingHandler>(provider => pingHandler.Object);\n\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n            var cts = new CancellationTokenSource();\n\n            var ping = new PingRequest(\"Ping\");\n\n            var actualEx = Record.ExceptionAsync(\n                //\n                // Act\n                //\n                async() => await mediator.SendAsync<PingResponse>(ping, cts.Token)\n            );\n\n            Assert.IsType<ReturnFunctionIsNullException>(actualEx.Result);\n        }\n\n        [Fact]\n        public async Task SendAsync_Returns_Response()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>().PipelineAsync()\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooBarAsync(req)\n                    );\n            });\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n            var response = await mediator.SendAsync<PingResponse>(ping);\n\n            Assert.NotNull(response);\n        }\n\n        [Fact]\n        public void Send_Returns_Response()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>()\n                    .Pipeline()\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooMethod(req)\n                    );\n            });\n\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n            var response = mediator.Send<PingResponse>(ping);\n\n            Assert.NotNull(response);\n        }\n\n        [Fact]\n        public void Send_Named_PipelineReturns_Response()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>()\n                    .Pipeline()\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooMethod(req)\n                    );\n                m.On<PingRequest>()\n                    .Pipeline(\"Foo\")\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooMethod(req)\n                    );\n            });\n\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n            var response = mediator.Send<PingResponse>(ping, \"Foo\");\n\n            Assert.NotNull(response);\n        }\n\n        [Fact]\n        public async Task Send_Named_PipelineAsync_Returns_Response()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>()\n                    .PipelineAsync()\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooBarAsync(req)\n                    );\n                m.On<PingRequest>()\n                    .PipelineAsync(\"Foo\")\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req) => handler.MyCustomFooBarAsync(req)\n                    );\n            });\n\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var ping = new PingRequest(\"Ping\");\n            var response = await mediator.SendAsync<PingResponse>(ping, \"Foo\");\n\n            Assert.NotNull(response);\n        }\n\n        [Fact]\n        public async Task SendCancellable_Named_PipelineReturns_Response()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m =>\n            {\n                m.On<PingRequest>()\n                    .CancellablePipelineAsync()\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req, ct) => handler.MyCancellableForAsync(req, ct)\n                    );\n                m.On<PingRequest>()\n                    .CancellablePipelineAsync(\"Foo\")\n                    .Return<PingResponse, IPingHandler>(\n                        (handler, req, ct) => handler.MyCancellableForAsync(req, ct)\n                    );\n            });\n\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n            var cts = new CancellationTokenSource();\n\n            var ping = new PingRequest(\"Ping\");\n            var response = await mediator.SendAsync<PingResponse>(ping, cts.Token, \"Foo\");\n\n            Assert.NotNull(response);\n        }\n\n        [Fact]\n        public void Send_Throws_Exception_Null_Requests()\n        {\n            var services = new ServiceCollection();\n            services.AddFluentMediator(m => { });\n\n            services.AddScoped<IPingHandler, PingHandler>();\n            var provider = services.BuildServiceProvider();\n            var mediator = provider.GetRequiredService<IMediator>();\n\n            var actualEx = Record.Exception(() => mediator.Send<PingResponse>(null!));\n\n            Assert.NotNull(actualEx);\n            Assert.IsType<NullRequestException>(actualEx);\n        }\n    }\n}"
  },
  {
    "path": "test/UnitTests/UnitTests.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netcoreapp2.2</TargetFramework>\r\n    <IsPackable>false</IsPackable>\r\n    <Nullable>enable</Nullable>\r\n    <NullableReferenceTypes>true</NullableReferenceTypes>\r\n    <LangVersion>8.0</LangVersion>\r\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"16.4.0\" />\r\n    <PackageReference Include=\"xunit\" Version=\"2.4.1\" />\r\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.4.1\" />\r\n    <DotNetCliToolReference Include=\"dotnet-xunit\" Version=\"2.3.1\" />\r\n    <PackageReference Include=\"Microsoft.AspNetCore.App\" />\r\n    <PackageReference Include=\"Moq\" Version=\"4.13.1\"/>\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\src\\FluentMediator\\FluentMediator.csproj\" />\r\n    <ProjectReference Include=\"..\\..\\src\\FluentMediator.Microsoft.Extensions.DependencyInjection\\FluentMediator.Microsoft.Extensions.DependencyInjection.csproj\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n"
  }
]