Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
丁松杰
/
Pole
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4ffee379
authored
Feb 24, 2020
by
dingsongjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
晚上 自定义 事件名称
parent
b4bdc9d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
src/Pole.Core/Serialization/EventTypeFinder.cs
src/Pole.EventBus.Rabbitmq/Core/RabbitEventBus.cs
src/Pole.Core/Serialization/EventTypeFinder.cs
View file @
4ffee379
...
...
@@ -24,6 +24,12 @@ namespace Pole.Core.Serialization
{
foreach
(
var
type
in
assembly
.
GetTypes
().
Where
(
m
=>
baseEventType
.
IsAssignableFrom
(
m
)&&!
m
.
IsAbstract
))
{
var
eventCode
=
type
.
FullName
;
var
eventAttribute
=
type
.
GetCustomAttributes
(
typeof
(
EventAttribute
),
false
).
FirstOrDefault
();
if
(
eventAttribute
is
EventAttribute
attribute
)
{
eventCode
=
attribute
.
EventName
;
}
typeDict
.
TryAdd
(
type
,
type
.
FullName
);
if
(!
codeDict
.
TryAdd
(
type
.
FullName
,
type
))
...
...
src/Pole.EventBus.Rabbitmq/Core/RabbitEventBus.cs
View file @
4ffee379
...
...
@@ -68,7 +68,7 @@ namespace Pole.EventBus.RabbitMQ
observerUnit
.
GetBatchEventHandler
())
{
EventBus
=
this
,
QueueInfo
=
new
QueueInfo
{
RoutingKey
=
RoutePrefix
,
Queue
=
$"
{
RoutePrefix
}
_
{
queueNameSuffix
}
"
},
QueueInfo
=
new
QueueInfo
{
RoutingKey
=
string
.
Empty
,
Queue
=
$"
{
RoutePrefix
}
_
{
queueNameSuffix
}
"
},
Config
=
ConsumerConfig
};
Consumers
.
Add
(
consumer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment