├── .gitignore
├── _Lib
├── Enyim.Caching.dll
├── Newtonsoft.Json.dll
├── EntLib
│ ├── EntLibConfig.exe
│ ├── EntLibConfig.pdb
│ ├── EntLibConfig-32.exe
│ ├── EntLibConfig-32.pdb
│ ├── MsmqDistributor.exe
│ ├── MsmqDistributor.pdb
│ ├── MergeConfiguration.exe
│ ├── CreateLoggingDatabase.sql
│ ├── Microsoft.Practices.Unity.dll
│ ├── references
│ │ ├── System.Spatial.dll
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Microsoft.Data.Edm.dll
│ │ ├── Microsoft.Data.OData.dll
│ │ ├── Microsoft.WindowsAzure.Storage.dll
│ │ ├── Microsoft.Practices.ServiceLocation.dll
│ │ └── Microsoft.WindowsAzure.Configuration.dll
│ ├── CreateLoggingDatabaseObjects.sql
│ ├── CreateLoggingDb.cmd
│ ├── CreateSemanticLoggingDatabase.sql
│ ├── Microsoft.Practices.Unity.Mvc.dll
│ ├── Microsoft.Practices.Unity.NetCore.dll
│ ├── Microsoft.Practices.Unity.NetCore.pri
│ ├── Microsoft.Practices.Unity.WebApi.dll
│ ├── Microsoft.Practices.Unity.Interception.dll
│ ├── Microsoft.Practices.Unity.Configuration.dll
│ ├── CreateSemanticLoggingDb.cmd
│ ├── Microsoft.Practices.EnterpriseLibrary.Data.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Common.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Logging.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.PolicyInjection.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.SemanticLogging.dll
│ ├── Microsoft.Practices.Unity.Interception.Configuration.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.pdb
│ ├── Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Database.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Data.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WPF.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzure.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.pdb
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.dll
│ ├── Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.pdb
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Configuration.dll
│ ├── EntLibConfig.exe.config
│ ├── EntLibConfig-32.exe.config
│ ├── Readme.txt
│ ├── MsmqDistributor.exe.config
│ ├── CreateSemanticLoggingDatabaseObjects.sql
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.xml
│ ├── Microsoft.Practices.Unity.WebApi.xml
│ ├── Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching.xml
│ ├── Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.xml
│ └── Microsoft.Practices.Unity.Mvc.xml
├── Linkup
│ ├── Linkup.Common.dll
│ ├── Linkup.Data.dll
│ └── Linkup.DataRelationalMapping.dll
└── Gma.QrCodeNet.Encoding.Net45.dll
├── packages
├── RabbitMQ.Client.4.1.3
│ ├── RabbitMQ.Client.4.1.3.nupkg
│ └── lib
│ │ ├── net451
│ │ └── RabbitMQ.Client.dll
│ │ └── netstandard1.5
│ │ └── RabbitMQ.Client.dll
└── Newtonsoft.Json.10.0.2
│ ├── Newtonsoft.Json.10.0.2.nupkg
│ ├── lib
│ ├── net20
│ │ └── Newtonsoft.Json.dll
│ ├── net35
│ │ └── Newtonsoft.Json.dll
│ ├── net40
│ │ └── Newtonsoft.Json.dll
│ ├── net45
│ │ └── Newtonsoft.Json.dll
│ ├── netstandard1.0
│ │ └── Newtonsoft.Json.dll
│ ├── netstandard1.3
│ │ └── Newtonsoft.Json.dll
│ ├── portable-net45+win8+wpa81+wp8
│ │ └── Newtonsoft.Json.dll
│ └── portable-net40+sl5+win8+wpa81+wp8
│ │ └── Newtonsoft.Json.dll
│ ├── LICENSE.md
│ └── tools
│ └── install.ps1
├── Sheng.RabbitMQ.CommandExecuter.RabbitMQ
├── packages.config
├── RabbitMQConfig
│ ├── RabbitMQConfig_Channel.cs
│ ├── RabbitMQConfig_ConnectionFactory.cs
│ ├── RabbitMQConfig_Root.cs
│ ├── RabbitMQConfig_Exchange.cs
│ ├── RabbitMQConfig_Queue.cs
│ └── RabbitMQConfig.cs
├── Properties
│ └── AssemblyInfo.cs
├── Sheng.RabbitMQ.CommandExecuter.RabbitMQ.csproj
├── RabbitMQService - 副本.cs
└── RabbitMQClient.cs
├── Sheng.RabbitMQ.CommandExecuter.Core
├── packages.config
├── Sheng.RabbitMQ.CommandExecuter.Core.csproj.user
├── RabbitMQConfig
│ ├── RabbitMQConfig_Channel.cs
│ ├── RabbitMQConfig_QueueList.cs
│ ├── RabbitMQConfig_Root.cs
│ ├── RabbitMQConfig_ConnectionFactory.cs
│ ├── RabbitMQConfig_Queue.cs
│ └── RabbitMQConfig.cs
├── CommandReceiver
│ ├── CommandReceiver.cs
│ ├── DatabaseSyncForwardCommandReceiver.cs
│ ├── CommandReceiverFactory.cs
│ └── DatabaseSyncCommandReceiver.cs
├── DatabaseSyncConfig
│ ├── DatabaseSyncConfig_Field.cs
│ ├── DatabaseSyncConfig_Connection.cs
│ ├── DatabaseSyncConfig_Consumer.cs
│ ├── DatabaseSyncConfig_Table.cs
│ ├── DatabaseSyncConfig_Root.cs
│ ├── DatabaseSyncConfig_Producer.cs
│ └── DatabaseSyncConfig.cs
├── MassTransit发来的消息格式.txt
├── Properties
│ └── AssemblyInfo.cs
├── CommandExecuterService.cs
├── RabbitMQClient.cs
└── Sheng.RabbitMQ.CommandExecuter.Core.csproj
├── Sheng.RabbitMQ.CommandExecuter.Service
├── packages.config
├── Sheng.RabbitMQ.CommandExecuter.WindowsService.csproj.user
├── ProjectInstaller.cs
├── RabbitMQConfig.xml
├── Program.cs
├── DatabaseSyncConfig.xml
├── DataSyncService.cs
├── DataSyncService.Designer.cs
├── Properties
│ └── AssemblyInfo.cs
├── DatabaseSyncConfig - 副本 (2).xml
├── DatabaseSyncConfig - 副本.xml
├── ProjectInstaller.Designer.cs
├── DataSyncService.resx
├── ProjectInstaller.resx
└── Sheng.RabbitMQ.CommandExecuter.WindowsService.csproj
├── Sheng.RabbitMQ.CommandExecuter.WindowsForm
├── packages.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Program.cs
├── Form1.cs
├── Form1.resx
├── Form1.Designer.cs
└── Sheng.RabbitMQ.CommandExecuter.WindowsForm.csproj
├── Sheng.RabbitMQ.CommandExecuter.Contract
├── Sheng.RabbitMQ.CommandExecuter.Contract.csproj.user
├── Commands
│ ├── Command.cs
│ ├── Enums.cs
│ ├── DatabaseSyncForwardCommand.cs
│ └── DatabaseSyncCommand.cs
├── Properties
│ └── AssemblyInfo.cs
└── Sheng.RabbitMQ.CommandExecuter.Contract.csproj
├── README.md
├── LICENSE
└── Sheng.RabbitMQ.CommandExecuter.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | .vs
4 |
--------------------------------------------------------------------------------
/_Lib/Enyim.Caching.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Enyim.Caching.dll
--------------------------------------------------------------------------------
/_Lib/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/EntLibConfig.exe
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/EntLibConfig.pdb
--------------------------------------------------------------------------------
/_Lib/Linkup/Linkup.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Linkup/Linkup.Common.dll
--------------------------------------------------------------------------------
/_Lib/Linkup/Linkup.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Linkup/Linkup.Data.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig-32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/EntLibConfig-32.exe
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig-32.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/EntLibConfig-32.pdb
--------------------------------------------------------------------------------
/_Lib/EntLib/MsmqDistributor.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/MsmqDistributor.exe
--------------------------------------------------------------------------------
/_Lib/EntLib/MsmqDistributor.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/MsmqDistributor.pdb
--------------------------------------------------------------------------------
/_Lib/EntLib/MergeConfiguration.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/MergeConfiguration.exe
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateLoggingDatabase.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/CreateLoggingDatabase.sql
--------------------------------------------------------------------------------
/_Lib/Gma.QrCodeNet.Encoding.Net45.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Gma.QrCodeNet.Encoding.Net45.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/System.Spatial.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/System.Spatial.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateLoggingDatabaseObjects.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/CreateLoggingDatabaseObjects.sql
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/_Lib/Linkup/Linkup.DataRelationalMapping.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/Linkup/Linkup.DataRelationalMapping.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateLoggingDb.cmd:
--------------------------------------------------------------------------------
1 | sqlcmd -S (localdb)\v11.0 -E -i CreateLoggingDatabase.sql
2 | sqlcmd -S (localdb)\v11.0 -E -i CreateLoggingDatabaseObjects.sql -d Logging
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateSemanticLoggingDatabase.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/CreateSemanticLoggingDatabase.sql
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.Mvc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.Mvc.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Microsoft.Data.Edm.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Microsoft.Data.Edm.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.NetCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.NetCore.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.NetCore.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.NetCore.pri
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.WebApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.WebApi.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Microsoft.Data.OData.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Microsoft.Data.OData.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.Interception.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.Interception.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.Configuration.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateSemanticLoggingDb.cmd:
--------------------------------------------------------------------------------
1 | sqlcmd -S (localdb)\v11.0 -E -i CreateSemanticLoggingDatabase.sql
2 | sqlcmd -S (localdb)\v11.0 -E -i CreateSemanticLoggingDatabaseObjects.sql -d Logging
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Data.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Microsoft.WindowsAzure.Storage.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Microsoft.WindowsAzure.Storage.dll
--------------------------------------------------------------------------------
/packages/RabbitMQ.Client.4.1.3/RabbitMQ.Client.4.1.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/RabbitMQ.Client.4.1.3/RabbitMQ.Client.4.1.3.nupkg
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Common.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Logging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Logging.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/Newtonsoft.Json.10.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/Newtonsoft.Json.10.0.2.nupkg
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/net20/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/net20/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/net35/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/net35/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/net40/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/net40/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/net45/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/net45/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/RabbitMQ.Client.4.1.3/lib/net451/RabbitMQ.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/RabbitMQ.Client.4.1.3/lib/net451/RabbitMQ.Client.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Microsoft.Practices.ServiceLocation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Microsoft.Practices.ServiceLocation.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/references/Microsoft.WindowsAzure.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/references/Microsoft.WindowsAzure.Configuration.dll
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.PolicyInjection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.PolicyInjection.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.Interception.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.Unity.Interception.Configuration.dll
--------------------------------------------------------------------------------
/packages/RabbitMQ.Client.4.1.3/lib/netstandard1.5/RabbitMQ.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/RabbitMQ.Client.4.1.3/lib/netstandard1.5/RabbitMQ.Client.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.3/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.3/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.pdb
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Database.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Database.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Data.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WPF.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WPF.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzure.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzure.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.pdb
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/packages/Newtonsoft.Json.10.0.2/lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.dll
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.pdb
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccb1013/Sheng.RabbitMQ.CommandExecuter/HEAD/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Configuration.dll
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/Sheng.RabbitMQ.CommandExecuter.Core.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Sheng.RabbitMQ.CommandExecuter.Contract.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/Sheng.RabbitMQ.CommandExecuter.WindowsService.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/_Lib/EntLib/EntLibConfig-32.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Commands/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Sheng.RabbitMQ.CommandExecuter.Contract
8 | {
9 | public abstract class Command
10 | {
11 | public string CommandType
12 | {
13 | get;
14 | protected set;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Readme.txt:
--------------------------------------------------------------------------------
1 | MICROSOFT ENTERPRISE LIBRARY 6
2 |
3 | Summary: This package contains all the Enterprise Library binaries and scripts.
4 |
5 | Note: For the Semantic Logging Application Block Out-of-Process service, a separate package is available for download.
6 |
7 | The most up-to-date version of the release notes and known issues is available online:
8 | http://aka.ms/el6release
9 |
10 |
11 | Microsoft patterns & practices
12 | http://microsoft.com/practices
13 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig_Channel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | public class RabbitMQConfig_Channel
11 | {
12 | [XmlElement("queueList")]
13 | public RabbitMQConfig_QueueList QueueList
14 | {
15 | get;set;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig_QueueList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | public class RabbitMQConfig_QueueList
11 | {
12 | [XmlElement("queue")]
13 | public List QueueList
14 | {
15 | get;set;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig_Channel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | public class RabbitMQConfig_Channel
11 | {
12 | [XmlElement("queueList")]
13 | public RabbitMQConfig_QueueList QueueList
14 | {
15 | get;set;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/ProjectInstaller.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Configuration.Install;
6 | using System.Linq;
7 | using System.Threading.Tasks;
8 |
9 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsService
10 | {
11 | [RunInstaller(true)]
12 | public partial class ProjectInstaller : System.Configuration.Install.Installer
13 | {
14 | public ProjectInstaller()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Commands/Enums.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Sheng.RabbitMQ.CommandExecuter.Contract
8 | {
9 | public enum DatabaseSyncAction
10 | {
11 | ///
12 | /// 添加
13 | ///
14 | Add = 0,
15 | ///
16 | /// 更新
17 | ///
18 | Update = 1,
19 | ///
20 | /// 删除
21 | ///
22 | Delete = 2
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/CommandReceiver/CommandReceiver.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | abstract class CommandReceiver
11 | {
12 | protected static LogService _logService = LogService.Instance;
13 |
14 | public string CommandType
15 | {
16 | get;
17 | protected set;
18 | }
19 |
20 | public abstract void Handle(string routingKey, string strCommand);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Field.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | public class DatabaseSyncConfig_Field
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("consumerField")]
19 | public string ConsumerField
20 | {
21 | get; set;
22 | }
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/RabbitMQConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Connection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | public class DatabaseSyncConfig_Connection
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("connectionString")]
19 | public string ConnectionString
20 | {
21 | get; set;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sheng.RabbitMQ.CommandExecuter
2 |
3 | 请访问原版代码库,以获得最新更新: https://github.com/iccb1013/Sheng.RabbitMQ.CommandExecuter
4 |
5 | MIT 协议开源,可以随意使用,但是需在源代码和产品关于画面保留版权声明和我的网站链接,谢谢。
6 |
7 | Sheng.RabbitMQ.CommandExecuter 是使用 .Net 对 RabbitMQ 的一个简单封装。
8 |
9 | 它通过XML配置文件定义Exchange及队列等信息,根据此配置文件自动声明及初始化相关队列信息,方便 .Net 开发人员使用 RabbitMQ。
10 |
11 | 并实现了一个基于 MQ 的命令执行器,将 MQ 消息抽象化为命令,发布端和订阅端通过命令进行交互。默认实现了两个命令:
12 | + HTTP请求转发,将收到的MQ消息的指定内容转发到指定URL上;
13 | + 数据库同步,通过预先定义的配置文件,指明不同数据库和表之间的关联关系,发送端向 MQ 中发布数据库同步命令后,订阅方(可作为 windows 服务部署,已在工程中实现)负责解析并执行数据库同步工作。
14 |
15 | 你可以直接使用基本的 RabbitMQ 封装,也可以在此命令模式的基础上实现你自己的命令。
16 |
17 | 详细说明请浏览:
18 | https://shengxunwei.com
19 |
20 | 曹旭升(sheng.c)
21 | QQ:279060597
22 | Email:cao.silhouette@msn.com
23 | @南京
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig_Root.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | [XmlRoot("rabbitMQ")]
11 | public class RabbitMQConfig_Root
12 | {
13 | [XmlElement("connectionFactory")]
14 | public RabbitMQConfig_ConnectionFactory ConnectionFactory
15 | {
16 | get; set;
17 | }
18 |
19 | [XmlElement("channel")]
20 | public RabbitMQConfig_Channel Channel
21 | {
22 | get;set;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig_ConnectionFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | public class RabbitMQConfig_ConnectionFactory
11 | {
12 | [XmlAttribute("hostName")]
13 | public string HostName
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("userName")]
19 | public string UserName
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("password")]
25 | public string Password
26 | {
27 | get; set;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig_ConnectionFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.RabbitMQ
9 | {
10 | public class RabbitMQConfig_ConnectionFactory
11 | {
12 | [XmlAttribute("hostName")]
13 | public string HostName
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("userName")]
19 | public string UserName
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("password")]
25 | public string Password
26 | {
27 | get; set;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Program.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsForm
9 | {
10 | static class Program
11 | {
12 |
13 |
14 | ///
15 | /// 应用程序的主入口点。
16 | ///
17 | [STAThread]
18 | static void Main()
19 | {
20 | LogService _logService = LogService.Instance;
21 | _logService.Write("Application_Start");
22 |
23 | Application.EnableVisualStyles();
24 | Application.SetCompatibleTextRenderingDefault(false);
25 | Application.Run(new Form1());
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Commands/DatabaseSyncForwardCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Sheng.RabbitMQ.CommandExecuter.Contract
8 | {
9 | ///
10 | /// 数据库同步命令
11 | ///
12 | public class DatabaseSyncForwardCommand: Command
13 | {
14 | public const string CommandTypeName = "DatabaseSyncForwardCommand";
15 |
16 | public DatabaseSyncForwardCommand()
17 | {
18 | base.CommandType = CommandTypeName;
19 | }
20 |
21 | public string Url
22 | {
23 | get;set;
24 | }
25 |
26 | public string CommandContent
27 | {
28 | get;set;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig_Queue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace ShareJoy.SilkRoad.DataSync.Core
9 | {
10 | public class RabbitMQConfig_Queue
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("durable")]
19 | public bool Durable
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("exclusive")]
25 | public bool Exclusive
26 | {
27 | get; set;
28 | }
29 |
30 | [XmlAttribute("autoDelete")]
31 | public bool AutoDelete
32 | {
33 | get; set;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/Program.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.ServiceProcess;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsService
11 | {
12 | static class Program
13 | {
14 |
15 |
16 | ///
17 | /// 应用程序的主入口点。
18 | ///
19 | static void Main()
20 | {
21 | // Thread.Sleep(15000);
22 |
23 | LogService _logService = LogService.Instance;
24 |
25 | _logService.Write("Application_Start");
26 |
27 | ServiceBase[] ServicesToRun;
28 | ServicesToRun = new ServiceBase[]
29 | {
30 | new DataSyncService()
31 | };
32 | ServiceBase.Run(ServicesToRun);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig_Root.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.RabbitMQ
9 | {
10 | [XmlRoot("rabbitMQ")]
11 | public class RabbitMQConfig_Root
12 | {
13 | [XmlElement("connectionFactory")]
14 | public RabbitMQConfig_ConnectionFactory ConnectionFactory
15 | {
16 | get; set;
17 | }
18 |
19 | [XmlElement("exchangeList")]
20 | public RabbitMQConfig_Root_ExchangeList ExchangeList
21 | {
22 | get; set;
23 | }
24 | }
25 |
26 | public class RabbitMQConfig_Root_ExchangeList
27 | {
28 | [XmlElement("exchange")]
29 | public List Exchange
30 | {
31 | get; set;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DatabaseSyncConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig_Exchange.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.RabbitMQ
9 | {
10 | public class RabbitMQConfig_Exchange
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get;set;
16 | }
17 |
18 | [XmlAttribute("type")]
19 | public string Type
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlElement("queueList")]
25 | public RabbitMQConfig_Exchange_QueueList QueueList
26 | {
27 | get;set;
28 | }
29 | }
30 |
31 | public class RabbitMQConfig_Exchange_QueueList
32 | {
33 | [XmlElement("queue")]
34 | public List Queue
35 | {
36 | get; set;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DataSyncService.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Linq;
8 | using System.ServiceProcess;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 |
12 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsService
13 | {
14 | public partial class DataSyncService : ServiceBase
15 | {
16 | static LogService _logService = LogService.Instance;
17 |
18 | public DataSyncService()
19 | {
20 | InitializeComponent();
21 | }
22 |
23 | protected override void OnStart(string[] args)
24 | {
25 | _logService.Write("OnStart");
26 |
27 | Sheng.RabbitMQ.CommandExecuter.Core.CommandExecuterService.Instance.Start();
28 | }
29 |
30 | protected override void OnStop()
31 | {
32 | _logService.Write("OnStop");
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Consumer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | public class DatabaseSyncConfig_Consumer
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("connection")]
19 | public string Connection
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlElement("producerList")]
25 | public DatabaseSyncConfig_Consumer_ProducerList ProducerList
26 | {
27 | get;set;
28 | }
29 | }
30 |
31 | public class DatabaseSyncConfig_Consumer_ProducerList
32 | {
33 | [XmlElement("producer")]
34 | public List Producer
35 | {
36 | get; set;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 曹旭升(sheng.c)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Table.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | public class DatabaseSyncConfig_Table
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("primaryKey")]
19 | public string PrimaryKey
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("consumerTable")]
25 | public string ConsumerTable
26 | {
27 | get; set;
28 | }
29 |
30 | [XmlAttribute("consumerTablePrimaryKey")]
31 | public string ConsumerTablePrimaryKey
32 | {
33 | get; set;
34 | }
35 |
36 | [XmlElement("Field")]
37 | public List Field
38 | {
39 | get;set;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/MassTransit发来的消息格式.txt:
--------------------------------------------------------------------------------
1 | {
2 | "messageId": "02700000-4f1f-001e-0fcd-08d4821299a8",
3 | "conversationId": "02700000-4f1f-001e-11bf-08d4821299a8",
4 | "sourceAddress": "rabbitmq://192.168.70.115/bus-WIN-A52ACSGHFF5-w3wp-yjayyynxdhybhmscbdkerrnhry?durable=false&autodelete=true",
5 | "destinationAddress": "rabbitmq://192.168.70.115/ShareJoy.SilkRoad.Ultility.EventBus:DataSyncItem",
6 | "messageType": [
7 | "urn:message:ShareJoy.SilkRoad.Ultility.EventBus:DataSyncItem"
8 | ],
9 | "message": {
10 | "syncVerb": 2,
11 | "entityType": "ShareJoy.SilkRoad.Entities.Customer",
12 | "primaryKey": "84c223ca-f72a-4614-83a9-ab5f16af89a3",
13 | "syncSpecification": "ShareJoy.SilkRoad.Entities.Customer:Update"
14 | },
15 | "headers": {},
16 | "host": {
17 | "machineName": "WIN-A52ACSGHFF5",
18 | "processName": "w3wp",
19 | "processId": 13532,
20 | "assembly": "MassTransit",
21 | "assemblyVersion": "3.5.4.992",
22 | "frameworkVersion": "4.0.30319.34209",
23 | "massTransitVersion": "3.5.4.992",
24 | "operatingSystemVersion": "Microsoft Windows NT 6.1.7600.0"
25 | }
26 | }
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsForm.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2007 James Newton-King
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig_Queue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.RabbitMQ
9 | {
10 | public class RabbitMQConfig_Queue
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("durable")]
19 | public bool Durable
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("exclusive")]
25 | public bool Exclusive
26 | {
27 | get; set;
28 | }
29 |
30 | [XmlAttribute("autoDelete")]
31 | public bool AutoDelete
32 | {
33 | get; set;
34 | }
35 |
36 | [XmlAttribute("routingKey")]
37 | public string RoutingKey
38 | {
39 | get;set;
40 | }
41 |
42 | [XmlAttribute("type")]
43 | public string Type
44 | {
45 | get; set;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Sheng.RabbitMQ.CommandExecuter.Core")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sheng.RabbitMQ.CommandExecuter.Core")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("1dbba807-32ce-455b-9cc5-3f827a30cf0b")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Sheng.RabbitMQ.CommandExecuter.Contract")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sheng.RabbitMQ.CommandExecuter.Contract")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("dbbb3029-3f4b-4d0a-8c21-a518ad3d43ce")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Sheng.RabbitMQ.CommandExecuter.RabbitMQ")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sheng.RabbitMQ.CommandExecuter.RabbitMQ")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("0a7102cc-0d51-4d92-abd5-d809bfbcf365")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DataSyncService.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsService
2 | {
3 | partial class DataSyncService
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | //
32 | // DataSyncService
33 | //
34 | this.ServiceName = "Sheng.RabbitMQ.CommandExecuter.WindowsService";
35 |
36 | }
37 |
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Sheng.RabbitMQ.CommandExecuter.WindowsService")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sheng.RabbitMQ.CommandExecuter.WindowsService")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("2bb81832-0484-4d07-9d35-e673586842dc")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Sheng.RabbitMQ.CommandExecuter.WindowsForm")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sheng.RabbitMQ.CommandExecuter.WindowsForm")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("46aa9a6b-3b34-4b77-8825-9718598c3fc7")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQConfig/RabbitMQConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 | using System.Xml.Serialization;
10 |
11 | namespace ShareJoy.SilkRoad.DataSync.Core
12 | {
13 | public class RabbitMQConfig
14 | {
15 | static RabbitMQConfig()
16 | {
17 | }
18 |
19 | public static RabbitMQConfig_Root GetRabbitMQConfig()
20 | {
21 | RabbitMQConfig_Root config = null;
22 |
23 | try
24 | {
25 | XmlSerializer _xmlSerializer = new XmlSerializer(typeof(RabbitMQConfig_Root));
26 | string strXmlFile = Path.Combine(Application.StartupPath, "RabbitMQConfig.xml");
27 | FileStream stream = new FileStream(strXmlFile, FileMode.Open);
28 | config = _xmlSerializer.Deserialize(stream) as RabbitMQConfig_Root;
29 | }catch(Exception ex)
30 | {
31 | Debug.Assert(false, ex.Message);
32 | }
33 |
34 | return config;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Root.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | [XmlRoot("databaseSync")]
11 | public class DatabaseSyncConfig_Root
12 | {
13 | [XmlElement("connectionList")]
14 | public DatabaseSyncConfig_Root_ConnectionList ConnectionList
15 | {
16 | get; set;
17 | }
18 |
19 | [XmlElement("consumerList")]
20 | public DatabaseSyncConfig_Root_ConsumerList ConfigList
21 | {
22 | get; set;
23 | }
24 | }
25 |
26 | public class DatabaseSyncConfig_Root_ConnectionList
27 | {
28 | [XmlElement("connection")]
29 | public List Connection
30 | {
31 | get; set;
32 | }
33 | }
34 |
35 | public class DatabaseSyncConfig_Root_ConsumerList
36 | {
37 | [XmlElement("consumer")]
38 | public List ConsumerList
39 | {
40 | get; set;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig_Producer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Xml.Serialization;
7 |
8 | namespace Sheng.RabbitMQ.CommandExecuter.Core
9 | {
10 | public class DatabaseSyncConfig_Producer
11 | {
12 | [XmlAttribute("name")]
13 | public string Name
14 | {
15 | get; set;
16 | }
17 |
18 | [XmlAttribute("routingKey")]
19 | public string RoutingKey
20 | {
21 | get; set;
22 | }
23 |
24 | [XmlAttribute("queueName")]
25 | public string QueueName
26 | {
27 | get; set;
28 | }
29 |
30 | [XmlAttribute("connection")]
31 | public string Connection
32 | {
33 | get; set;
34 | }
35 |
36 | [XmlElement("tableDefinition")]
37 | public DatabaseSyncConfig_TableDefinition TableDefinition
38 | {
39 | get; set;
40 | }
41 | }
42 |
43 | public class DatabaseSyncConfig_TableDefinition
44 | {
45 | [XmlElement("table")]
46 | public List TableList
47 | {
48 | get; set;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DatabaseSyncConfig - 副本 (2).xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/DatabaseSyncConfig/DatabaseSyncConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 | using System.Xml;
10 | using System.Xml.Serialization;
11 |
12 | namespace Sheng.RabbitMQ.CommandExecuter.Core
13 | {
14 | public class DatabaseSyncConfig
15 | {
16 | static DatabaseSyncConfig()
17 | {
18 | }
19 |
20 | public static DatabaseSyncConfig_Root GetDatabaseSyncConfig()
21 | {
22 | DatabaseSyncConfig_Root config = null;
23 | FileStream stream = null;
24 | try
25 | {
26 | XmlSerializer _xmlSerializer = new XmlSerializer(typeof(DatabaseSyncConfig_Root));
27 | string strXmlFile = Path.Combine(Application.StartupPath, "DatabaseSyncConfig.xml");
28 | stream = new FileStream(strXmlFile, FileMode.Open);
29 | config = _xmlSerializer.Deserialize(stream) as DatabaseSyncConfig_Root;
30 |
31 | }
32 | catch (Exception ex)
33 | {
34 | Debug.Assert(false, ex.Message);
35 | }
36 | finally
37 | {
38 | if (stream != null)
39 | {
40 | stream.Close();
41 | stream.Dispose();
42 | }
43 | }
44 |
45 | return config;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Commands/DatabaseSyncCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Sheng.RabbitMQ.CommandExecuter.Contract
8 | {
9 | ///
10 | /// 数据库同步命令
11 | ///
12 | public class DatabaseSyncCommand: Command
13 | {
14 | public const string CommandTypeName = "DatabaseSyncCommand";
15 |
16 | private List _syncItemList = new List();
17 | ///
18 | /// 要同步的项目列表,列表中的项目将封装成事务按集合顺序执行
19 | ///
20 | public List SyncItemList
21 | {
22 | get { return _syncItemList; }
23 | set { _syncItemList = value; }
24 | }
25 |
26 | public DatabaseSyncCommand()
27 | {
28 | base.CommandType = CommandTypeName;
29 | }
30 | }
31 |
32 | ///
33 | /// 数据库同步项目
34 | ///
35 | public class DatabaseSyncItem
36 | {
37 | ///
38 | /// 表名
39 | ///
40 | public string Table
41 | {
42 | get;set;
43 | }
44 |
45 | ///
46 | /// 主键的值
47 | ///
48 | public string PrimaryKeyValue
49 | {
50 | get;set;
51 | }
52 |
53 | ///
54 | /// 动作
55 | ///
56 | public DatabaseSyncAction Action
57 | {
58 | get;set;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DatabaseSyncConfig - 副本.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/CommandExecuterService.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using Sheng.RabbitMQ.CommandExecuter.RabbitMQ;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Diagnostics;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Sheng.RabbitMQ.CommandExecuter.Core
11 | {
12 | public class CommandExecuterService
13 | {
14 | private static readonly CommandExecuterService _instance = new CommandExecuterService();
15 | public static CommandExecuterService Instance
16 | {
17 | get { return _instance; }
18 | }
19 |
20 | private RabbitMQService _rabbitMQService = RabbitMQService.Instance;
21 | private CommandReceiverFactory _commandReceiverFactory = CommandReceiverFactory.Instance;
22 | private LogService _logService = LogService.Instance;
23 |
24 | private CommandExecuterService()
25 | {
26 | _rabbitMQService.Subscribe(MessageHandle);
27 | }
28 |
29 | private void MessageHandle(ulong deliveryTag, string routingKey, string body)
30 | {
31 | if (String.IsNullOrEmpty(routingKey) || String.IsNullOrEmpty(body))
32 | {
33 | _logService.Write("routingKey 或 body 为空。", TraceEventType.Warning);
34 | Debug.Assert(false, "routingKey 或 body 为空。");
35 | return;
36 | }
37 |
38 | string strCommandType = JsonHelper.GetProperty(body, "CommandType");
39 |
40 | if (String.IsNullOrEmpty(strCommandType))
41 | {
42 | _logService.Write("strCommandType 为空。", body, TraceEventType.Warning);
43 | Debug.Assert(false, "strCommandType 为空。");
44 | return;
45 | }
46 |
47 | _commandReceiverFactory.Handle(routingKey, strCommandType, body);
48 | }
49 |
50 | public void Start()
51 | {
52 | _rabbitMQService.Start();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQConfig/RabbitMQConfig.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Configuration;
5 | using System.Diagnostics;
6 | using System.IO;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 | using System.Xml.Serialization;
12 |
13 | namespace Sheng.RabbitMQ.CommandExecuter.RabbitMQ
14 | {
15 | public class RabbitMQConfig
16 | {
17 | private static LogService _logService = LogService.Instance;
18 |
19 | static RabbitMQConfig()
20 | {
21 | }
22 |
23 | public static RabbitMQConfig_Root GetRabbitMQConfig()
24 | {
25 | RabbitMQConfig_Root config = null;
26 | FileStream stream = null;
27 | try
28 | {
29 | string strXmlFile = Path.Combine(Application.StartupPath, "RabbitMQConfig.xml");
30 | if (File.Exists(strXmlFile) == false)
31 | {
32 | strXmlFile = Path.Combine(ConfigurationManager.AppSettings["RootPath"], "RabbitMQConfig.xml");
33 | }
34 |
35 | _logService.Write("RabbitMQConfig.xml", strXmlFile, TraceEventType.Verbose);
36 |
37 | XmlSerializer _xmlSerializer = new XmlSerializer(typeof(RabbitMQConfig_Root));
38 | stream = new FileStream(strXmlFile, FileMode.Open);
39 | config = _xmlSerializer.Deserialize(stream) as RabbitMQConfig_Root;
40 | }
41 | catch (Exception ex)
42 | {
43 | _logService.Write("RabbitMQConfig.xml 加载失败", ex.Message, TraceEventType.Error);
44 | Debug.Assert(false, ex.Message);
45 | }
46 | finally
47 | {
48 | if (stream != null)
49 | {
50 | stream.Close();
51 | stream.Dispose();
52 | }
53 | }
54 |
55 | return config;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/ProjectInstaller.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsService
2 | {
3 | partial class ProjectInstaller
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
32 | this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
33 | //
34 | // serviceProcessInstaller1
35 | //
36 | this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService;
37 | this.serviceProcessInstaller1.Password = null;
38 | this.serviceProcessInstaller1.Username = null;
39 | //
40 | // serviceInstaller1
41 | //
42 | this.serviceInstaller1.ServiceName = "Sheng.RabbitMQ.CommandExecuter.WindowsService";
43 | //
44 | // ProjectInstaller
45 | //
46 | this.Installers.AddRange(new System.Configuration.Install.Installer[] {
47 | this.serviceProcessInstaller1,
48 | this.serviceInstaller1});
49 |
50 | }
51 |
52 | #endregion
53 |
54 | private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
55 | private System.ServiceProcess.ServiceInstaller serviceInstaller1;
56 | }
57 | }
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/CommandReceiver/DatabaseSyncForwardCommandReceiver.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using Newtonsoft.Json;
3 | using Sheng.RabbitMQ.CommandExecuter.Contract;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Configuration;
7 | using System.Diagnostics;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 |
12 | namespace Sheng.RabbitMQ.CommandExecuter.Core
13 | {
14 | class DatabaseSyncForwardCommandReceiver : CommandReceiver
15 | {
16 | private HttpService _httpService = HttpService.Instance;
17 | private string _url;
18 |
19 | public DatabaseSyncForwardCommandReceiver()
20 | {
21 | base.CommandType = DatabaseSyncForwardCommand.CommandTypeName;
22 |
23 | _url = ConfigurationManager.AppSettings["DatabaseSyncForwardUrl"];
24 | }
25 |
26 | public override void Handle(string routingKey, string strCommand)
27 | {
28 | DatabaseSyncForwardCommand command =
29 | JsonConvert.DeserializeObject(strCommand);
30 |
31 | HttpRequestArgs args = new HttpRequestArgs();
32 |
33 | if (String.IsNullOrEmpty(command.Url) == false)
34 | {
35 | args.Url = command.Url;
36 | }
37 | else
38 | {
39 | args.Url = _url;
40 | }
41 |
42 | args.Content = command.CommandContent;
43 |
44 | _logService.Write("DatabaseSyncForwardCommandReceiver 发起HTTP请求",
45 | JsonHelper.Serializer(args), TraceEventType.Verbose);
46 |
47 | HttpRequestResult result = _httpService.Request(args);
48 |
49 | if (result.Success)
50 | {
51 | _logService.Write("DatabaseSyncForwardCommandReceiver HTTP请求完成",
52 | JsonHelper.Serializer(result), TraceEventType.Verbose);
53 | }
54 | else
55 | {
56 | _logService.Write("DatabaseSyncForwardCommandReceiver HTTP请求失败",
57 | JsonHelper.Serializer(result), TraceEventType.Warning);
58 |
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/_Lib/EntLib/MsmqDistributor.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsForm.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sheng.RabbitMQ.CommandExecuter.WindowsForm.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/_Lib/EntLib/CreateSemanticLoggingDatabaseObjects.sql:
--------------------------------------------------------------------------------
1 | SET ANSI_NULLS ON
2 | GO
3 | SET QUOTED_IDENTIFIER ON
4 | GO
5 |
6 | CREATE TYPE TracesType AS TABLE
7 | (
8 | [InstanceName] [nvarchar](1000),
9 | [ProviderId] [uniqueidentifier],
10 | [ProviderName] [nvarchar](500),
11 | [EventId] [int],
12 | [EventKeywords] [bigint],
13 | [Level] [int],
14 | [Opcode] [int],
15 | [Task] [int],
16 | [Timestamp] [datetimeoffset](7),
17 | [Version] [int],
18 | [FormattedMessage] [nvarchar](4000),
19 | [Payload] [nvarchar](4000)
20 | );
21 |
22 | GO
23 |
24 |
25 | CREATE PROCEDURE [dbo].[WriteTrace]
26 | (
27 | @InstanceName [nvarchar](1000),
28 | @ProviderId [uniqueidentifier],
29 | @ProviderName [nvarchar](500),
30 | @EventId [int],
31 | @EventKeywords [bigint],
32 | @Level [int],
33 | @Opcode [int],
34 | @Task [int],
35 | @Timestamp [datetimeoffset](7),
36 | @Version [int],
37 | @FormattedMessage [nvarchar](4000),
38 | @Payload [nvarchar](4000),
39 | @TraceId [bigint] OUTPUT
40 | )
41 | AS
42 | BEGIN
43 | SET NOCOUNT ON;
44 |
45 | INSERT INTO [Traces] (
46 | [InstanceName],
47 | [ProviderId],
48 | [ProviderName],
49 | [EventId],
50 | [EventKeywords],
51 | [Level],
52 | [Opcode],
53 | [Task],
54 | [Timestamp],
55 | [Version],
56 | [FormattedMessage],
57 | [Payload]
58 | )
59 | VALUES (
60 | @InstanceName,
61 | @ProviderId,
62 | @ProviderName,
63 | @EventId,
64 | @EventKeywords,
65 | @Level,
66 | @Opcode,
67 | @Task,
68 | @Timestamp,
69 | @Version,
70 | @FormattedMessage,
71 | @Payload)
72 |
73 | SET @TraceId = @@IDENTITY
74 | RETURN @TraceId
75 | END
76 |
77 | GO
78 |
79 | CREATE PROCEDURE [dbo].[WriteTraces]
80 | (
81 | @InsertTraces TracesType READONLY
82 | )
83 | AS
84 | BEGIN
85 | INSERT INTO [Traces] (
86 | [InstanceName],
87 | [ProviderId],
88 | [ProviderName],
89 | [EventId],
90 | [EventKeywords],
91 | [Level],
92 | [Opcode],
93 | [Task],
94 | [Timestamp],
95 | [Version],
96 | [FormattedMessage],
97 | [Payload]
98 | )
99 | SELECT * FROM @InsertTraces;
100 | END
101 |
102 | GO
103 | CREATE TABLE [dbo].[Traces](
104 | [id] [bigint] IDENTITY(1,1) NOT NULL,
105 | [InstanceName] [nvarchar](1000) NOT NULL,
106 | [ProviderId] [uniqueidentifier] NOT NULL,
107 | [ProviderName] [nvarchar](500) NOT NULL,
108 | [EventId] [int] NOT NULL,
109 | [EventKeywords] [bigint] NOT NULL,
110 | [Level] [int] NOT NULL,
111 | [Opcode] [int] NOT NULL,
112 | [Task] [int] NOT NULL,
113 | [Timestamp] [datetimeoffset](7) NOT NULL,
114 | [Version] [int] NOT NULL,
115 | [FormattedMessage] [nvarchar](4000) NULL,
116 | [Payload] [nvarchar](4000) NULL,
117 | CONSTRAINT [PK_Traces] PRIMARY KEY CLUSTERED
118 | (
119 | [id] ASC
120 | )WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
121 | )
122 |
123 | GO
124 |
125 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Contract/Sheng.RabbitMQ.CommandExecuter.Contract.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}
8 | Library
9 | Properties
10 | Sheng.RabbitMQ.CommandExecuter.Contract
11 | Sheng.RabbitMQ.CommandExecuter.Contract
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
58 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/CommandReceiver/CommandReceiverFactory.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Sheng.RabbitMQ.CommandExecuter.Core
10 | {
11 | class CommandReceiverFactory
12 | {
13 | private static readonly CommandReceiverFactory _instance = new CommandReceiverFactory();
14 | public static CommandReceiverFactory Instance
15 | {
16 | get { return _instance; }
17 | }
18 |
19 | protected static LogService _logService = LogService.Instance;
20 |
21 | private Dictionary _receiverList = new Dictionary();
22 |
23 | private CommandReceiverFactory()
24 | {
25 | List receiverTypeList = ReflectionHelper.GetTypeListBaseOn();
26 | foreach (var receiverType in receiverTypeList)
27 | {
28 | CommandReceiver receiver = (CommandReceiver)Activator.CreateInstance(receiverType);
29 | _receiverList.Add(receiver.CommandType, receiver);
30 | }
31 | }
32 |
33 | public void Handle(string routingKey, string strCommandType, string strCommand)
34 | {
35 | _logService.Write("处理命令:" + strCommandType , strCommand, TraceEventType.Verbose);
36 |
37 | if (String.IsNullOrEmpty(strCommandType) || String.IsNullOrEmpty(strCommand))
38 | {
39 | _logService.Write("strCommandType 或 strCommand 为空" ,
40 | strCommandType + Environment.NewLine + strCommand, TraceEventType.Verbose);
41 |
42 | Debug.Assert(false, "strCommandType 或 strCommand 为空");
43 | return;
44 | }
45 |
46 | if(_receiverList.ContainsKey(strCommandType) == false)
47 | {
48 | _logService.Write("strCommandType 不支持:" + strCommandType, strCommand, TraceEventType.Error);
49 |
50 | Debug.Assert(false, "strCommandType 不支持");
51 | return;
52 | }
53 |
54 | CommandReceiver receiver = _receiverList[strCommandType];
55 |
56 | try
57 | {
58 | receiver.Handle(routingKey, strCommand);
59 | }
60 | catch (Exception ex)
61 | {
62 | Debug.Assert(false, ex.Message);
63 |
64 | string msg = strCommand;
65 |
66 | msg += Environment.NewLine + ex.Message;
67 | if (ex.InnerException != null)
68 | {
69 | msg += Environment.NewLine + ex.InnerException.Message;
70 | }
71 |
72 | _logService.Write("CommandReceiverFactory.Handle 异常", msg, TraceEventType.Error);
73 | }
74 |
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus
5 |
6 |
7 |
8 |
9 | Provides extensions to the class for using the Windows Azure Service Bus retry strategy.
10 |
11 |
12 |
13 |
14 | The technology name that can be used to get default Service Bus retry strategy name.
15 |
16 |
17 |
18 |
19 | Returns the default retry strategy for the Windows Azure Service Bus.
20 |
21 | The default Windows Azure Service Bus retry strategy (or the default strategy if no default for Windows Azure Service Bus could be found).
22 |
23 |
24 |
25 | Returns the default retry policy dedicated to handling transient conditions with Windows Azure Service Bus.
26 |
27 | The retry policy for Windows Azure Service Bus with the corresponding default strategy (or the default strategy if no retry strategy definition for Windows Azure Service Bus was found).
28 |
29 |
30 |
31 | Provides the transient error detection logic that can recognize transient faults when dealing with Windows Azure Service Bus.
32 |
33 |
34 |
35 |
36 | Provides a compiled regular expression used for extracting the error code from the message.
37 |
38 |
39 |
40 |
41 | Determines whether the specified exception represents a transient failure that can be compensated by a retry.
42 |
43 | The exception object to be verified.
44 | true if the specified exception is considered transient; otherwise, false.
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sheng.RabbitMQ.CommandExecuter.WindowsService", "Sheng.RabbitMQ.CommandExecuter.Service\Sheng.RabbitMQ.CommandExecuter.WindowsService.csproj", "{2BB81832-0484-4D07-9D35-E673586842DC}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sheng.RabbitMQ.CommandExecuter.Core", "Sheng.RabbitMQ.CommandExecuter.Core\Sheng.RabbitMQ.CommandExecuter.Core.csproj", "{1DBBA807-32CE-455B-9CC5-3F827A30CF0B}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sheng.RabbitMQ.CommandExecuter.WindowsForm", "Sheng.RabbitMQ.CommandExecuter.WindowsForm\Sheng.RabbitMQ.CommandExecuter.WindowsForm.csproj", "{46AA9A6B-3B34-4B77-8825-9718598C3FC7}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sheng.RabbitMQ.CommandExecuter.RabbitMQ", "Sheng.RabbitMQ.CommandExecuter.RabbitMQ\Sheng.RabbitMQ.CommandExecuter.RabbitMQ.csproj", "{0A7102CC-0D51-4D92-ABD5-D809BFBCF365}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sheng.RabbitMQ.CommandExecuter.Contract", "Sheng.RabbitMQ.CommandExecuter.Contract\Sheng.RabbitMQ.CommandExecuter.Contract.csproj", "{DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Release|Any CPU = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {2BB81832-0484-4D07-9D35-E673586842DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {2BB81832-0484-4D07-9D35-E673586842DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {2BB81832-0484-4D07-9D35-E673586842DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {2BB81832-0484-4D07-9D35-E673586842DC}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {1DBBA807-32CE-455B-9CC5-3F827A30CF0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {1DBBA807-32CE-455B-9CC5-3F827A30CF0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {1DBBA807-32CE-455B-9CC5-3F827A30CF0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {1DBBA807-32CE-455B-9CC5-3F827A30CF0B}.Release|Any CPU.Build.0 = Release|Any CPU
30 | {46AA9A6B-3B34-4B77-8825-9718598C3FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {46AA9A6B-3B34-4B77-8825-9718598C3FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {46AA9A6B-3B34-4B77-8825-9718598C3FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {46AA9A6B-3B34-4B77-8825-9718598C3FC7}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {0A7102CC-0D51-4D92-ABD5-D809BFBCF365}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {0A7102CC-0D51-4D92-ABD5-D809BFBCF365}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {0A7102CC-0D51-4D92-ABD5-D809BFBCF365}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {0A7102CC-0D51-4D92-ABD5-D809BFBCF365}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {DBBB3029-3F4B-4D0A-8C21-A518AD3D43CE}.Release|Any CPU.Build.0 = Release|Any CPU
42 | EndGlobalSection
43 | GlobalSection(SolutionProperties) = preSolution
44 | HideSolutionNode = FALSE
45 | EndGlobalSection
46 | EndGlobal
47 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Form1.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 | using Sheng.RabbitMQ.CommandExecuter.Contract;
3 | using Sheng.RabbitMQ.CommandExecuter.Core;
4 | using Sheng.RabbitMQ.CommandExecuter.RabbitMQ;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel;
8 | using System.Data;
9 | using System.Diagnostics;
10 | using System.Drawing;
11 | using System.IO;
12 | using System.Linq;
13 | using System.Text;
14 | using System.Threading.Tasks;
15 | using System.Windows.Forms;
16 | using System.Xml;
17 | using System.Xml.Serialization;
18 |
19 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsForm
20 | {
21 | public partial class Form1 : Form
22 | {
23 | RabbitMQService _rabbitMQService = RabbitMQService.Instance;
24 |
25 | public Form1()
26 | {
27 | InitializeComponent();
28 | }
29 |
30 | private void Form1_Load(object sender, EventArgs e)
31 | {
32 |
33 | }
34 |
35 | private void btnStartClient_Click(object sender, EventArgs e)
36 | {
37 | CommandExecuterService.Instance.Start();
38 | }
39 |
40 | private void btnStartService_Click(object sender, EventArgs e)
41 | {
42 | _rabbitMQService.Subscribe("routingKey_B", RabbitMQCallback);
43 |
44 | _rabbitMQService.Start();
45 |
46 | MessageBox.Show("RabbitMQService 已启动。");
47 | }
48 |
49 | private void RabbitMQCallback(ulong deliveryTag, string routingKey, string body)
50 | {
51 | _rabbitMQService.Ack(deliveryTag, false);
52 |
53 | Debug.WriteLine(routingKey + Environment.NewLine + body);
54 |
55 | MessageBox.Show(routingKey + Environment.NewLine + body);
56 | }
57 |
58 | private void btnSendDatabaseSyncCommand_Click(object sender, EventArgs e)
59 | {
60 | DatabaseSyncCommand cmd = new DatabaseSyncCommand();
61 |
62 | DatabaseSyncItem item1 = new DatabaseSyncItem()
63 | {
64 | Action = DatabaseSyncAction.Add,
65 | Table = "Customers",
66 | PrimaryKeyValue = "062B54F5-69AA-A108-09F8-39DB9C2F58C4"
67 | };
68 |
69 | DatabaseSyncItem item2 = new DatabaseSyncItem()
70 | {
71 | Action = DatabaseSyncAction.Update,
72 | Table = "Customers",
73 | PrimaryKeyValue = "062B54F5-69AA-A108-09F8-39DB9C2F58C4"
74 | };
75 |
76 | DatabaseSyncItem item3 = new DatabaseSyncItem()
77 | {
78 | Action = DatabaseSyncAction.Delete,
79 | Table = "Customers",
80 | PrimaryKeyValue = "062B54F5-69AA-A108-09F8-39DB9C2F58C4"
81 | };
82 |
83 | cmd.SyncItemList.Add(item1);
84 | cmd.SyncItemList.Add(item2);
85 | cmd.SyncItemList.Add(item3);
86 |
87 | string json = JsonConvert.SerializeObject(cmd);
88 |
89 | _rabbitMQService.Send("exchangeName_A", "routingKey_A", json);
90 |
91 | MessageBox.Show("DatabaseSyncCommand 命令已发送。 Command 需要通过 CommandExecuterService 去解析和消费。");
92 | }
93 |
94 | private void btnSendSimpleString_Click(object sender, EventArgs e)
95 | {
96 | _rabbitMQService.Send("exchangeName_A", "routingKey_B", "123");
97 | }
98 |
99 |
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/Sheng.RabbitMQ.CommandExecuter.RabbitMQ.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {0A7102CC-0D51-4D92-ABD5-D809BFBCF365}
8 | Library
9 | Properties
10 | Sheng.RabbitMQ.CommandExecuter.RabbitMQ
11 | Sheng.RabbitMQ.CommandExecuter.RabbitMQ
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | False
35 | ..\_Lib\Linkup\Linkup.Common.dll
36 |
37 |
38 | ..\packages\RabbitMQ.Client.4.1.3\lib\net451\RabbitMQ.Client.dll
39 | True
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
72 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQService - 副本.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using RabbitMQ.Client;
3 | using RabbitMQ.Client.Events;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Diagnostics;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace ShareJoy.SilkRoad.RabbitMQ
12 | {
13 | public class RabbitMQService
14 | {
15 | private static readonly RabbitMQService _instance = new RabbitMQService();
16 | public static RabbitMQService Instance
17 | {
18 | get { return _instance; }
19 | }
20 |
21 | private RabbitMQConfig_Root _rabbitMQConfig = null;
22 | private LogService _logService = LogService.Instance;
23 |
24 | IModel _channel;
25 | IBasicProperties _properties;
26 |
27 | private RabbitMQService()
28 | {
29 | try
30 | {
31 | _rabbitMQConfig = RabbitMQConfig.GetRabbitMQConfig();
32 | }
33 | catch (Exception ex)
34 | {
35 | _logService.Write("加载 RabbitMQ 配置失败", ex.Message, TraceEventType.Error);
36 | }
37 | }
38 |
39 | public void Start()
40 | {
41 | if (_rabbitMQConfig == null)
42 | {
43 | _logService.Write("RabbitMQService.Start 失败,没有加载 RabbitMQ 配置", TraceEventType.Error);
44 | return;
45 | }
46 |
47 | _logService.Write("RabbitMQService.Start", TraceEventType.Verbose);
48 |
49 | ConnectionFactory factory = new ConnectionFactory();
50 | factory.HostName = _rabbitMQConfig.ConnectionFactory.HostName;
51 | factory.UserName = _rabbitMQConfig.ConnectionFactory.UserName;
52 | factory.Password = _rabbitMQConfig.ConnectionFactory.Password;
53 |
54 | IConnection connection = factory.CreateConnection();
55 | connection.CallbackException += Connection_CallbackException;
56 | connection.ConnectionBlocked += Connection_ConnectionBlocked;
57 | connection.ConnectionUnblocked += Connection_ConnectionUnblocked;
58 | connection.ConnectionShutdown += Connection_ConnectionShutdown;
59 |
60 | _channel = connection.CreateModel();
61 | _properties = _channel.CreateBasicProperties();
62 | _properties.Persistent = true;
63 |
64 | foreach (RabbitMQConfig_Exchange exchange in _rabbitMQConfig.ExchangeList.Exchange)
65 | {
66 | _channel.ExchangeDeclare(exchange.Name, exchange.Type);
67 |
68 | foreach (RabbitMQConfig_Queue queue in exchange.QueueList.Queue)
69 | {
70 | _channel.QueueDeclare(queue.Name, true, false, false, null);
71 | _channel.QueueBind(queue.Name, exchange.Name, queue.RoutingKey);
72 | }
73 | }
74 | }
75 |
76 | #region ConnectionEvent
77 |
78 | private void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e)
79 | {
80 | _logService.Write("RabbitMQService.Connection_ConnectionShutdown", TraceEventType.Verbose);
81 | }
82 |
83 | private void Connection_ConnectionUnblocked(object sender, EventArgs e)
84 | {
85 | _logService.Write("RabbitMQService.Connection_ConnectionUnblocked", TraceEventType.Verbose);
86 | }
87 |
88 | private void Connection_ConnectionBlocked(object sender, ConnectionBlockedEventArgs e)
89 | {
90 | _logService.Write("RabbitMQService.Connection_ConnectionBlocked", TraceEventType.Verbose);
91 | }
92 |
93 | private void Connection_CallbackException(object sender, CallbackExceptionEventArgs e)
94 | {
95 | _logService.Write("RabbitMQService.Connection_CallbackException", TraceEventType.Verbose);
96 | }
97 |
98 | #endregion
99 |
100 | public void Send(string exchangeName, string routingKey, string body)
101 | {
102 | var bytes = Encoding.UTF8.GetBytes(body);
103 | _channel.BasicPublish(exchangeName, routingKey, _properties, bytes);
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.10.0.2/tools/install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | # open json.net splash page on package install
4 | # don't open if json.net is installed as a dependency
5 |
6 | try
7 | {
8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
10 |
11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
12 | {
13 | # user is installing from VS NuGet console
14 | # get reference to the window, the console host and the input history
15 | # show webpage if "install-package newtonsoft.json" was last input
16 |
17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
18 |
19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
20 | [System.Reflection.BindingFlags]::NonPublic)
21 |
22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
23 | if ($prop -eq $null) { return }
24 |
25 | $hostInfo = $prop.GetValue($consoleWindow)
26 | if ($hostInfo -eq $null) { return }
27 |
28 | $history = $hostInfo.WpfConsole.InputHistory.History
29 |
30 | $lastCommand = $history | select -last 1
31 |
32 | if ($lastCommand)
33 | {
34 | $lastCommand = $lastCommand.Trim().ToLower()
35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
36 | {
37 | $dte2.ItemOperations.Navigate($url) | Out-Null
38 | }
39 | }
40 | }
41 | else
42 | {
43 | # user is installing from VS NuGet dialog
44 | # get reference to the window, then smart output console provider
45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
46 |
47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
48 | [System.Reflection.BindingFlags]::NonPublic)
49 |
50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
51 | [System.Reflection.BindingFlags]::NonPublic)
52 |
53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return }
54 |
55 | $instance = $instanceField.GetValue($null)
56 |
57 | if ($instance -eq $null) { return }
58 |
59 | $consoleProvider = $consoleField.GetValue($instance)
60 | if ($consoleProvider -eq $null) { return }
61 |
62 | $console = $consoleProvider.CreateOutputConsole($false)
63 |
64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
65 | [System.Reflection.BindingFlags]::NonPublic)
66 | if ($messagesField -eq $null) { return }
67 |
68 | $messages = $messagesField.GetValue($console)
69 | if ($messages -eq $null) { return }
70 |
71 | $operations = $messages -split "=============================="
72 |
73 | $lastOperation = $operations | select -last 1
74 |
75 | if ($lastOperation)
76 | {
77 | $lastOperation = $lastOperation.ToLower()
78 |
79 | $lines = $lastOperation -split "`r`n"
80 |
81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
82 |
83 | if ($installMatch)
84 | {
85 | $dte2.ItemOperations.Navigate($url) | Out-Null
86 | }
87 | }
88 | }
89 | }
90 | catch
91 | {
92 | try
93 | {
94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
95 |
96 | $selection = $pmPane.TextDocument.Selection
97 | $selection.StartOfDocument($false)
98 | $selection.EndOfDocument($true)
99 |
100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
101 | {
102 | # don't show on upgrade
103 | if (!$selection.Text.Contains("Removed package"))
104 | {
105 | $dte2.ItemOperations.Navigate($url) | Out-Null
106 | }
107 | }
108 | }
109 | catch
110 | {
111 | # stop potential errors from bubbling up
112 | # worst case the splash page won't open
113 | }
114 | }
115 |
116 | # still yolo
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/RabbitMQClient.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using Newtonsoft.Json;
3 | using RabbitMQ.Client;
4 | using RabbitMQ.Client.Events;
5 | using ShareJoy.SilkRoad.RabbitMQ;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Diagnostics;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 |
13 | namespace ShareJoy.SilkRoad.DataSync.Core
14 | {
15 | public class RabbitMQClient
16 | {
17 | private static readonly RabbitMQClient _instance = new RabbitMQClient();
18 | public static RabbitMQClient Instance
19 | {
20 | get { return _instance; }
21 | }
22 |
23 | private RabbitMQConfig_Root _rabbitMQConfig = null;
24 | private CommandReceiverFactory _commandReceiverFactory = CommandReceiverFactory.Instance;
25 | private LogService _logService = LogService.Instance;
26 |
27 | private RabbitMQClient()
28 | {
29 | try
30 | {
31 | _rabbitMQConfig = RabbitMQConfig.GetRabbitMQConfig();
32 | }catch(Exception ex)
33 | {
34 | _logService.Write("加载 RabbitMQ 配置失败", ex.Message, TraceEventType.Error);
35 | }
36 | }
37 |
38 | public void Start()
39 | {
40 | if (_rabbitMQConfig == null)
41 | {
42 | _logService.Write("RabbitMQClient.Start 失败,没有加载 RabbitMQ 配置", TraceEventType.Error);
43 | return;
44 | }
45 |
46 | _logService.Write("RabbitMQClient.Start", TraceEventType.Verbose);
47 |
48 | ConnectionFactory factory = new ConnectionFactory();
49 | factory.HostName = _rabbitMQConfig.ConnectionFactory.HostName;
50 | factory.UserName = _rabbitMQConfig.ConnectionFactory.UserName;
51 | factory.Password = _rabbitMQConfig.ConnectionFactory.Password;
52 |
53 | IConnection connection = factory.CreateConnection();
54 | connection.CallbackException += Connection_CallbackException;
55 | connection.ConnectionBlocked += Connection_ConnectionBlocked;
56 | connection.ConnectionUnblocked += Connection_ConnectionUnblocked;
57 | connection.ConnectionShutdown += Connection_ConnectionShutdown;
58 |
59 | IModel channel = connection.CreateModel();
60 |
61 | foreach (RabbitMQConfig_Exchange exchange in _rabbitMQConfig.ExchangeList.Exchange)
62 | {
63 | foreach (RabbitMQConfig_Queue queue in exchange.QueueList.Queue)
64 | {
65 | channel.QueueDeclare(queue.Name, queue.Durable, queue.Exclusive, queue.AutoDelete, null);
66 | channel.BasicQos(0, 1, false);
67 | }
68 | }
69 |
70 | var consumer = new EventingBasicConsumer(channel);
71 | consumer.Received += Consumer_Received;
72 |
73 | foreach (RabbitMQConfig_Exchange exchange in _rabbitMQConfig.ExchangeList.Exchange)
74 | {
75 | foreach (RabbitMQConfig_Queue queue in exchange.QueueList.Queue)
76 | {
77 | channel.BasicConsume(queue.Name, true, consumer);
78 | }
79 | }
80 | }
81 |
82 | private void Consumer_Received(object sender, BasicDeliverEventArgs e)
83 | {
84 | string strBody = Encoding.UTF8.GetString(e.Body);
85 |
86 | _logService.Write("收到MQ消息命令", strBody, TraceEventType.Verbose);
87 |
88 | //string strCommand = JsonHelper.GetProperty(strBody, "message");
89 | string strCommandType = JsonHelper.GetProperty(strBody, "CommandType");
90 |
91 | _commandReceiverFactory.Handle(e.RoutingKey, strCommandType, strBody);
92 |
93 |
94 | }
95 |
96 | #region ConnectionEvent
97 |
98 | private void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e)
99 | {
100 | _logService.Write("Connection_ConnectionShutdown", TraceEventType.Verbose);
101 | }
102 |
103 | private void Connection_ConnectionUnblocked(object sender, EventArgs e)
104 | {
105 | _logService.Write("Connection_ConnectionUnblocked", TraceEventType.Verbose);
106 | }
107 |
108 | private void Connection_ConnectionBlocked(object sender, ConnectionBlockedEventArgs e)
109 | {
110 | _logService.Write("Connection_ConnectionBlocked", TraceEventType.Verbose);
111 | }
112 |
113 | private void Connection_CallbackException(object sender, CallbackExceptionEventArgs e)
114 | {
115 | _logService.Write("Connection_CallbackException", TraceEventType.Verbose);
116 | }
117 |
118 | #endregion
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.WebApi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.Unity.WebApi
5 |
6 |
7 |
8 |
9 | An implementation of that wraps a Unity container and creates a new child container
10 | when is invoked.
11 |
12 |
13 | Because each scope creates a new child Unity container, you can benefit from using the
14 | lifetime manager.
15 |
16 |
17 |
18 |
19 | Initializes a new instance of the class for a container.
20 |
21 | The to wrap with the
22 | interface implementation.
23 |
24 |
25 |
26 | Starts a resolution scope by creating a new child Unity container.
27 |
28 | The dependency scope.
29 |
30 |
31 |
32 | Disposes the wrapped .
33 |
34 |
35 |
36 |
37 | Resolves an instance of the default requested type from the container.
38 |
39 | The of the object to get from the container.
40 | The retrieved object.
41 |
42 |
43 |
44 | Resolves multiply registered services.
45 |
46 | The type of the requested services.
47 | The requested services.
48 |
49 |
50 |
51 | An implementation of the interface that wraps a Unity container.
52 |
53 |
54 |
55 |
56 | Initializes a new instance of the class for a container.
57 |
58 | The to wrap with the
59 | interface implementation.
60 |
61 |
62 |
63 | Reuses the same scope to resolve all the instances.
64 |
65 | The shared dependency scope.
66 |
67 |
68 |
69 | Disposes the wrapped .
70 |
71 |
72 |
73 |
74 | Resolves an instance of the default requested type from the container.
75 |
76 | The of the object to get from the container.
77 | The requested object.
78 |
79 |
80 |
81 | Resolves multiply registered services.
82 |
83 | The type of the requested services.
84 | The requested services.
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/CommandReceiver/DatabaseSyncCommandReceiver.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Data;
2 | using Linkup.DataRelationalMapping;
3 | using Newtonsoft.Json;
4 | using Sheng.RabbitMQ.CommandExecuter.Contract;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Data;
8 | using System.Diagnostics;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 |
13 | namespace Sheng.RabbitMQ.CommandExecuter.Core
14 | {
15 | class DatabaseSyncCommandReceiver : CommandReceiver
16 | {
17 | private DatabaseSyncConfig_Root _databaseSyncConfig = DatabaseSyncConfig.GetDatabaseSyncConfig();
18 | private Dictionary _dataBaseList = new Dictionary();
19 |
20 | public DatabaseSyncCommandReceiver()
21 | {
22 | base.CommandType = DatabaseSyncCommand.CommandTypeName;
23 |
24 | InitDatabase();
25 | }
26 |
27 | private void InitDatabase()
28 | {
29 | foreach (var connection in _databaseSyncConfig.ConnectionList.Connection)
30 | {
31 | DatabaseWrapper database = new DatabaseWrapper(connection.ConnectionString, true);
32 | _dataBaseList.Add(connection.Name, database);
33 | }
34 | }
35 |
36 | public override void Handle(string routingKey, string strCommand)
37 | {
38 | DatabaseSyncCommand command = JsonConvert.DeserializeObject(strCommand);
39 |
40 | foreach (DatabaseSyncConfig_Consumer consumer in _databaseSyncConfig.ConfigList.ConsumerList)
41 | {
42 | Consume(routingKey, consumer, command);
43 | }
44 | }
45 |
46 | private void Consume(string routingKey, DatabaseSyncConfig_Consumer consumer, DatabaseSyncCommand command)
47 | {
48 | List producerList = (from c in consumer.ProducerList.Producer
49 | where c.RoutingKey == routingKey
50 | select c).ToList();
51 |
52 | foreach (var producer in producerList)
53 | {
54 | Consume(consumer, producer, command);
55 | }
56 | }
57 |
58 | private void Consume(DatabaseSyncConfig_Consumer consumer, DatabaseSyncConfig_Producer producer, DatabaseSyncCommand command)
59 | {
60 | DatabaseWrapper consumerDatabase = _dataBaseList[consumer.Connection];
61 | DatabaseWrapper producerDatabase = _dataBaseList[producer.Connection];
62 |
63 | List sqlExpressionList = new List();
64 |
65 | foreach (DatabaseSyncItem syncItem in command.SyncItemList)
66 | {
67 | List tableList = (from c in producer.TableDefinition.TableList
68 | where c.Name == syncItem.Table
69 | select c).ToList();
70 |
71 | foreach (DatabaseSyncConfig_Table table in tableList)
72 | {
73 | List parameterList = new List();
74 | parameterList.Add(new CommandParameter("@primaryKeyValue", syncItem.PrimaryKeyValue));
75 |
76 | DataSet dataSet = producerDatabase.ExecuteDataSet(
77 | $"SELECT * FROM [{table.Name}] WHERE [{table.PrimaryKey}] = @primaryKeyValue",
78 | parameterList, new string[] { table.Name });
79 |
80 | if (dataSet.Tables[0].Rows.Count == 0)
81 | continue;
82 |
83 | foreach (DataRow row in dataSet.Tables[0].Rows)
84 | {
85 | SqlStructureBuild sqlStructureBuild = new SqlStructureBuild();
86 | sqlStructureBuild.Table = table.ConsumerTable;
87 |
88 | switch (syncItem.Action)
89 | {
90 | case DatabaseSyncAction.Add:
91 | sqlStructureBuild.Type = SqlExpressionType.Insert;
92 | break;
93 | case DatabaseSyncAction.Update:
94 | sqlStructureBuild.Type = SqlExpressionType.Update;
95 | break;
96 | case DatabaseSyncAction.Delete:
97 | sqlStructureBuild.Type = SqlExpressionType.Delete;
98 | break;
99 | default:
100 | break;
101 | }
102 |
103 | foreach (DatabaseSyncConfig_Field field in table.Field)
104 | {
105 | sqlStructureBuild.AddParameter(field.ConsumerField, row[field.Name],
106 | field.ConsumerField == table.ConsumerTablePrimaryKey);
107 | }
108 |
109 | SqlExpression sqlExpression = sqlStructureBuild.GetSqlExpression();
110 | sqlExpressionList.Add(sqlExpression);
111 | }
112 | }
113 | }
114 |
115 | consumerDatabase.ExcuteSqlExpression(sqlExpressionList);
116 |
117 | }
118 |
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Core/Sheng.RabbitMQ.CommandExecuter.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {1DBBA807-32CE-455B-9CC5-3F827A30CF0B}
8 | Library
9 | Properties
10 | Sheng.RabbitMQ.CommandExecuter.Core
11 | Sheng.RabbitMQ.CommandExecuter.Core
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | False
35 | ..\_Lib\Linkup\Linkup.Common.dll
36 |
37 |
38 | False
39 | ..\_Lib\Linkup\Linkup.Data.dll
40 |
41 |
42 | False
43 | ..\_Lib\Linkup\Linkup.DataRelationalMapping.dll
44 |
45 |
46 | ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll
47 | True
48 |
49 |
50 | ..\packages\RabbitMQ.Client.4.1.3\lib\net451\RabbitMQ.Client.dll
51 | True
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | {dbbb3029-3f4b-4d0a-8c21-a518ad3d43ce}
88 | Sheng.RabbitMQ.CommandExecuter.Contract
89 |
90 |
91 | {0a7102cc-0d51-4d92-abd5-d809bfbcf365}
92 | Sheng.RabbitMQ.CommandExecuter.RabbitMQ
93 |
94 |
95 |
96 |
103 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/DataSyncService.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | False
122 |
123 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.RabbitMQ/RabbitMQClient.cs:
--------------------------------------------------------------------------------
1 | using Linkup.Common;
2 | using RabbitMQ.Client;
3 | using RabbitMQ.Client.Events;
4 | using ShareJoy.SilkRoad.RabbitMQ;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Diagnostics;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 |
12 | namespace ShareJoy.SilkRoad.RabbitMQ
13 | {
14 | public class RabbitMQClient
15 | {
16 | private static readonly RabbitMQClient _instance = new RabbitMQClient();
17 | public static RabbitMQClient Instance
18 | {
19 | get { return _instance; }
20 | }
21 |
22 | private RabbitMQConfig_Root _rabbitMQConfig = null;
23 | private LogService _logService = LogService.Instance;
24 |
25 | private Dictionary> _callbackList = new Dictionary>();
26 |
27 | private RabbitMQClient()
28 | {
29 | try
30 | {
31 | _rabbitMQConfig = RabbitMQConfig.GetRabbitMQConfig();
32 | }
33 | catch (Exception ex)
34 | {
35 | _logService.Write("加载 RabbitMQ 配置失败", ex.Message, TraceEventType.Error);
36 | }
37 | }
38 |
39 | public void Start()
40 | {
41 | if (_rabbitMQConfig == null)
42 | {
43 | _logService.Write("RabbitMQClient.Start 失败,没有加载 RabbitMQ 配置", TraceEventType.Error);
44 | return;
45 | }
46 |
47 | _logService.Write("RabbitMQClient.Start", TraceEventType.Verbose);
48 |
49 | ConnectionFactory factory = new ConnectionFactory();
50 | factory.HostName = _rabbitMQConfig.ConnectionFactory.HostName;
51 | factory.UserName = _rabbitMQConfig.ConnectionFactory.UserName;
52 | factory.Password = _rabbitMQConfig.ConnectionFactory.Password;
53 |
54 | IConnection connection = factory.CreateConnection();
55 | connection.CallbackException += Connection_CallbackException;
56 | connection.ConnectionBlocked += Connection_ConnectionBlocked;
57 | connection.ConnectionUnblocked += Connection_ConnectionUnblocked;
58 | connection.ConnectionShutdown += Connection_ConnectionShutdown;
59 |
60 | IModel channel = connection.CreateModel();
61 |
62 | foreach (RabbitMQConfig_Exchange exchange in _rabbitMQConfig.ExchangeList.Exchange)
63 | {
64 | foreach (RabbitMQConfig_Queue queue in exchange.QueueList.Queue)
65 | {
66 | channel.QueueDeclare(queue.Name, queue.Durable, queue.Exclusive, queue.AutoDelete, null);
67 | }
68 | }
69 |
70 | channel.BasicQos(0, 1, false);
71 |
72 | var consumer = new EventingBasicConsumer(channel);
73 | consumer.Received += Consumer_Received;
74 |
75 | foreach (RabbitMQConfig_Exchange exchange in _rabbitMQConfig.ExchangeList.Exchange)
76 | {
77 | foreach (RabbitMQConfig_Queue queue in exchange.QueueList.Queue)
78 | {
79 | channel.BasicConsume(queue.Name, true, consumer);
80 | }
81 | }
82 | }
83 |
84 | private void Consumer_Received(object sender, BasicDeliverEventArgs e)
85 | {
86 | string strBody = Encoding.UTF8.GetString(e.Body);
87 |
88 | _logService.Write("收到MQ消息命令", strBody, TraceEventType.Verbose);
89 |
90 | if (_callbackList.Count == 0)
91 | return;
92 |
93 | if (_callbackList.ContainsKey(e.RoutingKey) == false)
94 | return;
95 |
96 | List actionList = _callbackList[e.RoutingKey];
97 |
98 | if (actionList.Count == 0)
99 | return;
100 |
101 | foreach (var action in actionList)
102 | {
103 | action(e.RoutingKey, strBody);
104 | }
105 | }
106 |
107 | #region ConnectionEvent
108 |
109 | private void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e)
110 | {
111 | _logService.Write("RabbitMQClient.Connection_ConnectionShutdown", TraceEventType.Verbose);
112 | }
113 |
114 | private void Connection_ConnectionUnblocked(object sender, EventArgs e)
115 | {
116 | _logService.Write("RabbitMQClient.Connection_ConnectionUnblocked", TraceEventType.Verbose);
117 | }
118 |
119 | private void Connection_ConnectionBlocked(object sender, ConnectionBlockedEventArgs e)
120 | {
121 | _logService.Write("RabbitMQClient.Connection_ConnectionBlocked", TraceEventType.Verbose);
122 | }
123 |
124 | private void Connection_CallbackException(object sender, CallbackExceptionEventArgs e)
125 | {
126 | _logService.Write("RabbitMQClient.Connection_CallbackException", TraceEventType.Verbose);
127 | }
128 |
129 | #endregion
130 |
131 | public void Subscribe(string routingKey, RabbitMQCallback callback)
132 | {
133 | if (String.IsNullOrEmpty(routingKey))
134 | {
135 | throw new ArgumentNullException("routingKey");
136 | }
137 |
138 | if (callback == null)
139 | {
140 | throw new ArgumentNullException("callback");
141 | }
142 |
143 | if (_callbackList.ContainsKey(routingKey) == false)
144 | {
145 | lock (_callbackList)
146 | {
147 | if (_callbackList.ContainsKey(routingKey) == false)
148 | {
149 | _callbackList.Add(routingKey, new List());
150 | }
151 | }
152 | }
153 |
154 | List actionList = _callbackList[routingKey];
155 |
156 | if (actionList.Contains(callback) == false)
157 | {
158 | lock (actionList)
159 | {
160 | if (actionList.Contains(callback) == false)
161 | {
162 | actionList.Add(callback);
163 | }
164 | }
165 | }
166 | }
167 |
168 |
169 | public delegate void RabbitMQCallback(string routingKey, string body);
170 | }
171 | }
172 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/ProjectInstaller.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 55
122 |
123 |
124 | 208, 17
125 |
126 |
127 | False
128 |
129 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Sheng.RabbitMQ.CommandExecuter.WindowsForm
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.btnSendDatabaseSyncCommand = new System.Windows.Forms.Button();
32 | this.btnStartClient = new System.Windows.Forms.Button();
33 | this.btnStartService = new System.Windows.Forms.Button();
34 | this.btnSendSimpleString = new System.Windows.Forms.Button();
35 | this.label1 = new System.Windows.Forms.Label();
36 | this.label2 = new System.Windows.Forms.Label();
37 | this.label3 = new System.Windows.Forms.Label();
38 | this.label4 = new System.Windows.Forms.Label();
39 | this.SuspendLayout();
40 | //
41 | // btnSendDatabaseSyncCommand
42 | //
43 | this.btnSendDatabaseSyncCommand.Location = new System.Drawing.Point(14, 313);
44 | this.btnSendDatabaseSyncCommand.Name = "btnSendDatabaseSyncCommand";
45 | this.btnSendDatabaseSyncCommand.Size = new System.Drawing.Size(195, 23);
46 | this.btnSendDatabaseSyncCommand.TabIndex = 1;
47 | this.btnSendDatabaseSyncCommand.Text = "SendDatabaseSyncCommand";
48 | this.btnSendDatabaseSyncCommand.UseVisualStyleBackColor = true;
49 | this.btnSendDatabaseSyncCommand.Click += new System.EventHandler(this.btnSendDatabaseSyncCommand_Click);
50 | //
51 | // btnStartClient
52 | //
53 | this.btnStartClient.Location = new System.Drawing.Point(12, 12);
54 | this.btnStartClient.Name = "btnStartClient";
55 | this.btnStartClient.Size = new System.Drawing.Size(195, 23);
56 | this.btnStartClient.TabIndex = 2;
57 | this.btnStartClient.Text = "CommandExecuterService";
58 | this.btnStartClient.UseVisualStyleBackColor = true;
59 | this.btnStartClient.Click += new System.EventHandler(this.btnStartClient_Click);
60 | //
61 | // btnStartService
62 | //
63 | this.btnStartService.Location = new System.Drawing.Point(12, 155);
64 | this.btnStartService.Name = "btnStartService";
65 | this.btnStartService.Size = new System.Drawing.Size(195, 23);
66 | this.btnStartService.TabIndex = 3;
67 | this.btnStartService.Text = "Start RabbitMQService";
68 | this.btnStartService.UseVisualStyleBackColor = true;
69 | this.btnStartService.Click += new System.EventHandler(this.btnStartService_Click);
70 | //
71 | // btnSendSimpleString
72 | //
73 | this.btnSendSimpleString.Location = new System.Drawing.Point(12, 243);
74 | this.btnSendSimpleString.Name = "btnSendSimpleString";
75 | this.btnSendSimpleString.Size = new System.Drawing.Size(195, 23);
76 | this.btnSendSimpleString.TabIndex = 4;
77 | this.btnSendSimpleString.Text = "SendSimpleString";
78 | this.btnSendSimpleString.UseVisualStyleBackColor = true;
79 | this.btnSendSimpleString.Click += new System.EventHandler(this.btnSendSimpleString_Click);
80 | //
81 | // label1
82 | //
83 | this.label1.Location = new System.Drawing.Point(12, 48);
84 | this.label1.Name = "label1";
85 | this.label1.Size = new System.Drawing.Size(402, 53);
86 | this.label1.TabIndex = 5;
87 | this.label1.Text = "初始化一个CommandExecuterService,监听配置文件中所定义的队列的消息。并视MQ队列中的所有消息均是派生自Command的类型,尝试解析并执行这" +
88 | "些Command。";
89 | //
90 | // label2
91 | //
92 | this.label2.Location = new System.Drawing.Point(10, 181);
93 | this.label2.Name = "label2";
94 | this.label2.Size = new System.Drawing.Size(402, 45);
95 | this.label2.TabIndex = 6;
96 | this.label2.Text = "启动一个RabbitMQService对象,这是一个基本的RabbitMQ的封装,它通过配置文件声明和初始化队列,随后可通过RabbitMQService提供的方" +
97 | "法订阅消息或发送消息。";
98 | //
99 | // label3
100 | //
101 | this.label3.Location = new System.Drawing.Point(10, 271);
102 | this.label3.Name = "label3";
103 | this.label3.Size = new System.Drawing.Size(402, 26);
104 | this.label3.TabIndex = 7;
105 | this.label3.Text = "使用上面初始化的RabbitMQService发送一个简单的字符串。";
106 | //
107 | // label4
108 | //
109 | this.label4.Location = new System.Drawing.Point(12, 349);
110 | this.label4.Name = "label4";
111 | this.label4.Size = new System.Drawing.Size(402, 26);
112 | this.label4.TabIndex = 8;
113 | this.label4.Text = "使用上面初始化的RabbitMQService发送一个 DatabaseSyncCommand(数据同步命令)";
114 | //
115 | // Form1
116 | //
117 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
118 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
119 | this.ClientSize = new System.Drawing.Size(426, 431);
120 | this.Controls.Add(this.label4);
121 | this.Controls.Add(this.label3);
122 | this.Controls.Add(this.label2);
123 | this.Controls.Add(this.label1);
124 | this.Controls.Add(this.btnSendSimpleString);
125 | this.Controls.Add(this.btnStartService);
126 | this.Controls.Add(this.btnStartClient);
127 | this.Controls.Add(this.btnSendDatabaseSyncCommand);
128 | this.Name = "Form1";
129 | this.Text = "Form1";
130 | this.Load += new System.EventHandler(this.Form1_Load);
131 | this.ResumeLayout(false);
132 |
133 | }
134 |
135 | #endregion
136 | private System.Windows.Forms.Button btnSendDatabaseSyncCommand;
137 | private System.Windows.Forms.Button btnStartClient;
138 | private System.Windows.Forms.Button btnStartService;
139 | private System.Windows.Forms.Button btnSendSimpleString;
140 | private System.Windows.Forms.Label label1;
141 | private System.Windows.Forms.Label label2;
142 | private System.Windows.Forms.Label label3;
143 | private System.Windows.Forms.Label label4;
144 | }
145 | }
146 |
147 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.Service/Sheng.RabbitMQ.CommandExecuter.WindowsService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2BB81832-0484-4D07-9D35-E673586842DC}
8 | WinExe
9 | Properties
10 | Sheng.RabbitMQ.CommandExecuter.WindowsService
11 | Sheng.RabbitMQ.CommandExecuter.WindowsService
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\_Lib\Linkup\Linkup.Common.dll
38 |
39 |
40 | False
41 | ..\_Lib\Linkup\Linkup.Data.dll
42 |
43 |
44 | False
45 | ..\_Lib\Linkup\Linkup.DataRelationalMapping.dll
46 |
47 |
48 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Common.dll
49 |
50 |
51 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Data.dll
52 |
53 |
54 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
55 |
56 |
57 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
58 |
59 |
60 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Logging.dll
61 |
62 |
63 | ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll
64 | True
65 |
66 |
67 | ..\packages\RabbitMQ.Client.4.1.3\lib\net451\RabbitMQ.Client.dll
68 | True
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | Component
85 |
86 |
87 | DataSyncService.cs
88 |
89 |
90 |
91 | Component
92 |
93 |
94 | ProjectInstaller.cs
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | DataSyncService.cs
105 |
106 |
107 | ProjectInstaller.cs
108 |
109 |
110 |
111 |
112 | PreserveNewest
113 | Designer
114 |
115 |
116 | PreserveNewest
117 |
118 |
119 |
120 |
121 | {dbbb3029-3f4b-4d0a-8c21-a518ad3d43ce}
122 | Sheng.RabbitMQ.CommandExecuter.Contract
123 |
124 |
125 | {1dbba807-32ce-455b-9cc5-3f827a30cf0b}
126 | Sheng.RabbitMQ.CommandExecuter.Core
127 |
128 |
129 | {0a7102cc-0d51-4d92-abd5-d809bfbcf365}
130 | Sheng.RabbitMQ.CommandExecuter.RabbitMQ
131 |
132 |
133 |
134 |
141 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Caching
5 |
6 |
7 |
8 |
9 | Provides the transient error detection logic that can recognize transient faults when dealing with Windows Azure Caching.
10 |
11 |
12 |
13 |
14 | Checks whether or not the specified exception belongs to a category of transient failures that can be compensated by a retry.
15 |
16 | The exception object to be verified.
17 | true if the specified exception belongs to the category of transient errors; otherwise, false.
18 |
19 |
20 |
21 | Checks whether an is of the Microsoft.ApplicationServer.Caching.DataCacheException type,
22 | and if so, checks the error code and status code to determine if it is transient.
23 | This method dynamically discovers the type, to avoid a hard reference to the
24 | Microsoft.ApplicationServer.Caching.Core assembly (either version 1.0.0.0 or 101.0.0.0).
25 |
26 |
27 |
28 |
29 | Checks whether is a transient DataCacheException.
30 |
31 | The exception object to be verified.
32 |
33 | if the exception is of type DataCacheException and is transient;
34 | if the exception is of type DataCacheException and is not transient;
35 | if the exception is not of type DataCacheException.
36 |
37 |
38 |
39 |
40 | A strongly-typed resource class, for looking up localized strings, etc.
41 |
42 |
43 |
44 |
45 | Returns the cached ResourceManager instance used by this class.
46 |
47 |
48 |
49 |
50 | Overrides the current thread's CurrentUICulture property for all
51 | resource lookups using this strongly typed resource class.
52 |
53 |
54 |
55 |
56 | Looks up a localized string similar to Assembly mismatch for type with name 'Microsoft.ApplicationServer.Caching.DataCacheException'. Expected partial assembly name is 'Microsoft.ApplicationServer.Caching.Core, PublicKeyToken=31bf3856ad364e35'. The actual assembly name found at runtime for the type is '{0}'..
57 |
58 |
59 |
60 |
61 | Looks up a localized string similar to Expected type mismatch for type with partial name 'Microsoft.ApplicationServer.Caching.DataCacheException, Microsoft.ApplicationServer.Caching.Core, PublicKeyToken=31bf3856ad364e35'. The supported versions of the assembly defining the type are 1.0.0.0 and 101.0.0.0..
62 |
63 |
64 |
65 |
66 | Provides extensions to the class for using the Windows Azure Caching retry strategy.
67 |
68 |
69 |
70 |
71 | The technology name that can be used to get the default Caching retry strategy name.
72 |
73 |
74 |
75 |
76 | Returns the default retry strategy for Windows Azure Caching.
77 |
78 | The default Windows Azure Caching retry strategy (or the default strategy if no default could be found for Windows Azure Caching).
79 |
80 |
81 |
82 | Returns the default retry policy dedicated to handling transient conditions with Windows Azure Caching.
83 |
84 | The retry policy for Windows Azure Caching with the corresponding default strategy (or the default strategy if no retry strategy definition assigned to Windows Azure Caching was found).
85 |
86 |
87 |
88 | Returns the default retry strategy for Windows Azure Caching.
89 |
90 | The default Windows Azure Caching retry strategy (or the default strategy if no default could be found for Windows Azure Caching).
91 |
92 |
93 |
94 | Returns the default retry policy dedicated to handling transient conditions with Windows Azure Caching.
95 |
96 | The retry policy for Windows Azure Caching with the corresponding default strategy (or the default strategy if no retry strategy definition for Windows Azure Caching was found).
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet
5 |
6 |
7 |
8 |
9 | A strongly-typed resource class, for looking up localized strings, etc.
10 |
11 |
12 |
13 |
14 | Returns the cached ResourceManager instance used by this class.
15 |
16 |
17 |
18 |
19 | Overrides the current thread's CurrentUICulture property for all
20 | resource lookups using this strongly typed resource class.
21 |
22 |
23 |
24 |
25 | Looks up a localized string similar to Value conversion failed unexpectedly..
26 |
27 |
28 |
29 |
30 | Looks up a localized string similar to The property name "{0}" is not mapped to validators in the naming context..
31 |
32 |
33 |
34 |
35 | Looks up a localized string similar to The property name "{0}" is not valid..
36 |
37 |
38 |
39 |
40 | Looks up a localized string similar to The source type could not be found for name "{0}"..
41 |
42 |
43 |
44 |
45 | Looks up a localized string similar to The source type name cannot be null..
46 |
47 |
48 |
49 |
50 | Represents access to a property value.
51 |
52 |
53 |
54 |
55 | Initialize a new instance of the class with the property name.
56 |
57 | The property name.
58 |
59 |
60 |
61 | Retrieves a value from .
62 |
63 | The source for the value.
64 | The value retrieved from the .
65 | A message describing the failure to access the value, if any.
66 | when the retrieval was successful; otherwise.
67 | Subclasses provide concrete value accessing behaviors.
68 |
69 |
70 |
71 | Gets a hint of the location of the value relative to the object where it was retrieved from.
72 |
73 |
74 |
75 |
76 | Performs validation on a control's value using the validation specified on the property of .
77 |
78 |
79 |
80 |
81 |
82 |
83 | Determines whether the content in the input control is valid.
84 |
85 | if the control is valid; otherwise, .
86 |
87 |
88 |
89 | Gets or sets the name of the type to use a source for validation specifications.
90 |
91 |
92 |
93 |
94 | Gets or sets the name of the property to use as soource for validation specifications.
95 |
96 |
97 |
98 |
99 | Gets or sets the name of the ruleset to use when retrieving validation specifications.
100 |
101 |
102 |
103 |
104 | Gets or sets the indicating where to get validation specifications from.
105 |
106 |
107 |
108 |
109 | Gets or sets the indicating how to format multiple validation results.
110 |
111 |
112 |
113 |
114 | Occurs when value conversion is required by the control to perform validation.
115 |
116 |
117 | The ValueConvert event is raised when value conversion is required by the control to perform validation.
118 | This event is used to provide a custom value conversion routine for an input control,
119 | such as a control.
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/_Lib/EntLib/Microsoft.Practices.Unity.Mvc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.Unity.Mvc
5 |
6 |
7 |
8 |
9 | A that holds onto the instance given to it during
10 | the lifetime of a single HTTP request.
11 | This lifetime manager enables you to create instances of registered types that behave like
12 | singletons within the scope of an HTTP request.
13 | See remarks for important usage information.
14 |
15 |
16 |
17 | Although the lifetime manager works correctly and can help
18 | in working with stateful or thread-unsafe dependencies within the scope of an HTTP request, it is
19 | generally not a good idea to use it when it can be avoided, as it can often lead to bad practices or
20 | hard to find bugs in the end-user's application code when used incorrectly.
21 | It is recommended that the dependencies you register are stateless and if there is a need to share
22 | common state between several objects during the lifetime of an HTTP request, then you can
23 | have a stateless service that explicitly stores and retrieves this state using the
24 | collection of the object.
25 |
26 |
27 | For the instance of the registered type to be disposed automatically when the HTTP request completes,
28 | make sure to register the with the web application.
29 | To do this, invoke the following in the Unity bootstrapping class (typically UnityMvcActivator.cs):
30 | DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule));
31 |
32 |
33 |
34 |
35 |
36 | Retrieves a value from the backing store associated with this lifetime policy.
37 |
38 | The desired object, or null if no such object is currently stored.
39 |
40 |
41 |
42 | Stores the given value into the backing store for retrieval later.
43 |
44 | The object being stored.
45 |
46 |
47 |
48 | Removes the given object from the backing store.
49 |
50 |
51 |
52 |
53 | An implementation of that wraps a Unity container.
54 |
55 |
56 |
57 |
58 | Initializes a new instance of the class for a container.
59 |
60 | The to wrap with the
61 | interface implementation.
62 |
63 |
64 |
65 | Resolves an instance of the default requested type from the container.
66 |
67 | The of the object to get from the container.
68 | The requested object.
69 |
70 |
71 |
72 | Resolves multiply registered services.
73 |
74 | The type of the requested services.
75 | The requested services.
76 |
77 |
78 |
79 | Defines a filter provider for filter attributes that support injection of Unity dependencies.
80 |
81 |
82 |
83 |
84 | Initializes a new instance of the class.
85 |
86 | The that will be used to inject the filters.
87 |
88 |
89 |
90 | Gets a collection of custom action attributes, and injects them using a Unity container.
91 |
92 | The controller context.
93 | The action descriptor.
94 | A collection of custom action attributes.
95 |
96 |
97 |
98 | Gets a collection of controller attributes, and injects them using a Unity container.
99 |
100 | The controller context.
101 | The action descriptor.
102 | A collection of controller attributes.
103 |
104 |
105 |
106 | Implementation of the interface that provides support for using the
107 | lifetime manager, and enables it to
108 | dispose the instances after the HTTP request ends.
109 |
110 |
111 |
112 |
113 | Disposes the resources used by this module.
114 |
115 |
116 |
117 |
118 | Initializes a module and prepares it to handle requests.
119 |
120 | An that provides access to the methods, properties,
121 | and events common to all application objects within an ASP.NET application.
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/Sheng.RabbitMQ.CommandExecuter.WindowsForm/Sheng.RabbitMQ.CommandExecuter.WindowsForm.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {46AA9A6B-3B34-4B77-8825-9718598C3FC7}
8 | WinExe
9 | Properties
10 | Sheng.RabbitMQ.CommandExecuter.WindowsForm
11 | Sheng.RabbitMQ.CommandExecuter.WindowsForm
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | False
38 | ..\_Lib\Linkup\Linkup.Common.dll
39 |
40 |
41 | False
42 | ..\_Lib\Linkup\Linkup.Data.dll
43 |
44 |
45 | False
46 | ..\_Lib\Linkup\Linkup.DataRelationalMapping.dll
47 |
48 |
49 | False
50 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Common.dll
51 |
52 |
53 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Data.dll
54 |
55 |
56 | False
57 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
58 |
59 |
60 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
61 |
62 |
63 | False
64 | ..\_Lib\EntLib\Microsoft.Practices.EnterpriseLibrary.Logging.dll
65 |
66 |
67 | ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll
68 | True
69 |
70 |
71 | ..\packages\RabbitMQ.Client.4.1.3\lib\net451\RabbitMQ.Client.dll
72 | True
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | Form
89 |
90 |
91 | Form1.cs
92 |
93 |
94 |
95 |
96 | Form1.cs
97 |
98 |
99 | ResXFileCodeGenerator
100 | Resources.Designer.cs
101 | Designer
102 |
103 |
104 | True
105 | Resources.resx
106 | True
107 |
108 |
109 |
110 | SettingsSingleFileGenerator
111 | Settings.Designer.cs
112 |
113 |
114 | True
115 | Settings.settings
116 | True
117 |
118 |
119 |
120 |
121 | Designer
122 |
123 |
124 |
125 |
126 | {dbbb3029-3f4b-4d0a-8c21-a518ad3d43ce}
127 | Sheng.RabbitMQ.CommandExecuter.Contract
128 |
129 |
130 | {1dbba807-32ce-455b-9cc5-3f827a30cf0b}
131 | Sheng.RabbitMQ.CommandExecuter.Core
132 |
133 |
134 | {0a7102cc-0d51-4d92-abd5-d809bfbcf365}
135 | Sheng.RabbitMQ.CommandExecuter.RabbitMQ
136 |
137 |
138 |
139 |
140 | DatabaseSyncConfig.xml
141 | PreserveNewest
142 |
143 |
144 | RabbitMQConfig.xml
145 | PreserveNewest
146 | Designer
147 |
148 |
149 |
150 |
157 |
--------------------------------------------------------------------------------