From 47464ecd7d8d5753f48c78a449cd57e24b43b73e Mon Sep 17 00:00:00 2001 From: Richard Nagle Date: Tue, 4 Oct 2016 12:02:13 +0100 Subject: [PATCH] initial commit --- .gitignore | 256 +++++++++++++++++++++++++++++ TestBus.sln | 22 +++ TestBus/App.config | 33 ++++ TestBus/Program.cs | 32 ++++ TestBus/Properties/AssemblyInfo.cs | 36 ++++ TestBus/TestBus.csproj | 101 ++++++++++++ TestBus/packages.config | 13 ++ 7 files changed, 493 insertions(+) create mode 100644 .gitignore create mode 100644 TestBus.sln create mode 100644 TestBus/App.config create mode 100644 TestBus/Program.cs create mode 100644 TestBus/Properties/AssemblyInfo.cs create mode 100644 TestBus/TestBus.csproj create mode 100644 TestBus/packages.config diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..76222d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,256 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Cake +build/tools/*/* +build/tools/packages.config.md5sum + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml diff --git a/TestBus.sln b/TestBus.sln new file mode 100644 index 0000000..b8d3c7e --- /dev/null +++ b/TestBus.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestBus", "TestBus\TestBus.csproj", "{350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestBus/App.config b/TestBus/App.config new file mode 100644 index 0000000..bc72ab1 --- /dev/null +++ b/TestBus/App.config @@ -0,0 +1,33 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestBus/Program.cs b/TestBus/Program.cs new file mode 100644 index 0000000..8639475 --- /dev/null +++ b/TestBus/Program.cs @@ -0,0 +1,32 @@ +using System; +using Fri.Xhl.Domain.Events.Interfaces; +using MassTransit; + +namespace TestBus +{ + class Program + { + static void Main() + { + var bus = Bus.Factory.CreateUsingRabbitMq(x => + { + var host = x.Host(new Uri("rabbitmq://localhost/"), h => + { + h.Username("guest"); + h.Password("guest"); + }); + + x.ReceiveEndpoint(host, "test_bus", endpoint => + { + endpoint.Handler(async context => + { + await Console.Out.WriteLineAsync($"{DateTime.Now.ToShortTimeString()} Received Postcode: {context.Message.PostCode}"); + }); + }); + }); + + bus.Start(); + + } + } +} diff --git a/TestBus/Properties/AssemblyInfo.cs b/TestBus/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ef30614 --- /dev/null +++ b/TestBus/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TestBus")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestBus")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("350f0c55-f56a-4c39-8bc1-50b1ad3eeefc")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TestBus/TestBus.csproj b/TestBus/TestBus.csproj new file mode 100644 index 0000000..67685fd --- /dev/null +++ b/TestBus/TestBus.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {350F0C55-F56A-4C39-8BC1-50B1AD3EEEFC} + Exe + Properties + TestBus + TestBus + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Fri.Xhl.Domain.Events.Interfaces.9.9.59-beta\lib\Fri.Xhl.Domain.Events.Interfaces.dll + True + + + ..\packages\log4net.2.0.5\lib\net45-full\log4net.dll + True + + + ..\packages\MassTransit.3.4.1\lib\net452\MassTransit.dll + True + + + ..\packages\MassTransit.Log4Net.3.4.1\lib\net452\MassTransit.Log4NetIntegration.dll + True + + + ..\packages\MassTransit.RabbitMQ.3.4.1\lib\net452\MassTransit.RabbitMqTransport.dll + True + + + ..\packages\Metrics.1.0.8\lib\net40\metrics.dll + True + + + ..\packages\NewId.2.1.3\lib\net45\NewId.dll + True + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\RabbitMQ.Client.4.0.1\lib\net451\RabbitMQ.Client.dll + True + + + ..\packages\Metrics.1.0.8\lib\net40\ServiceStack.Text.dll + True + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestBus/packages.config b/TestBus/packages.config new file mode 100644 index 0000000..da58b28 --- /dev/null +++ b/TestBus/packages.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file