Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
d8e323c7
Commit
d8e323c7
authored
May 12, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor.
parent
3e373129
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
79 deletions
+0
-79
QMessageFinder.cs
src/Cap.Consistency/Internal/QMessageFinder.cs
+0
-43
QMessageMethodInfo.cs
src/Cap.Consistency/Internal/QMessageMethodInfo.cs
+0
-36
No files found.
src/Cap.Consistency/Internal/QMessageFinder.cs
deleted
100644 → 0
View file @
3e373129
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Reflection
;
using
System.Threading.Tasks
;
using
System.Collections.Concurrent
;
using
Cap.Consistency.Extensions
;
using
Cap.Consistency.Abstractions
;
namespace
Cap.Consistency
{
public
class
QMessageFinder
{
public
ConcurrentDictionary
<
string
,
ConsumerExecutorDescriptor
>
GetQMessageMethodInfo
(
params
Type
[]
serviceType
)
{
var
qMessageTypes
=
new
ConcurrentDictionary
<
string
,
ConsumerExecutorDescriptor
>();
foreach
(
var
type
in
serviceType
)
{
foreach
(
var
method
in
type
.
GetTypeInfo
().
DeclaredMethods
)
{
var
messageMethodInfo
=
new
ConsumerExecutorDescriptor
();
if
(
method
.
IsPropertyBinding
())
{
continue
;
}
var
qMessageAttr
=
method
.
GetCustomAttribute
<
QMessageAttribute
>();
if
(
qMessageAttr
==
null
)
{
continue
;
}
messageMethodInfo
.
ImplType
=
method
.
DeclaringType
;
messageMethodInfo
.
MethodInfo
=
method
;
qMessageTypes
.
AddOrUpdate
(
qMessageAttr
.
MessageName
,
messageMethodInfo
,
(
x
,
y
)
=>
y
);
}
}
return
qMessageTypes
;
}
}
}
src/Cap.Consistency/Internal/QMessageMethodInfo.cs
deleted
100644 → 0
View file @
3e373129
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Reflection
;
using
System.Threading.Tasks
;
namespace
Cap.Consistency
{
public
class
TopicInfo
{
public
TopicInfo
(
string
topicName
)
:
this
(
topicName
,
0
)
{}
public
TopicInfo
(
string
topicName
,
int
partition
)
:
this
(
topicName
,
partition
,
0
)
{}
public
TopicInfo
(
string
topicName
,
int
partition
,
long
offset
)
{
Name
=
topicName
;
Offset
=
offset
;
Partition
=
partition
;
}
public
string
Name
{
get
;
}
public
int
Partition
{
get
;
}
public
long
Offset
{
get
;
}
public
bool
IsPartition
{
get
{
return
Partition
==
0
;
}
}
public
bool
IsOffset
{
get
{
return
Offset
==
0
;
}
}
public
override
string
ToString
()
{
return
Name
;
}
}
}
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