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
eb3d9e6f
Commit
eb3d9e6f
authored
Dec 27, 2016
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code
parent
313b7844
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
ConsistencyMessage.cs
...Cap.Consistency.EntityFrameworkCore/ConsistencyMessage.cs
+3
-0
ConsistencyMessageManager.cs
src/Cap.Consistency/ConsistencyMessageManager.cs
+2
-2
ScratchDatabaseFixture.cs
...ityFrameworkCore.Test/Utilities/ScratchDatabaseFixture.cs
+1
-1
MessageManagerTestBase.cs
test/Shared/MessageManagerTestBase.cs
+1
-1
No files found.
src/Cap.Consistency.EntityFrameworkCore/ConsistencyMessage.cs
View file @
eb3d9e6f
...
...
@@ -6,6 +6,9 @@ namespace Cap.Consistency.EntityFrameworkCore
{
public
ConsistencyMessage
()
{
Id
=
Guid
.
NewGuid
().
ToString
();
SendTime
=
DateTime
.
Now
;
UpdateTime
=
SendTime
;
Status
=
MessageStatus
.
WaitForSend
;
}
}
...
...
src/Cap.Consistency/ConsistencyMessageManager.cs
View file @
eb3d9e6f
...
...
@@ -75,7 +75,7 @@ namespace Cap.Consistency
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="OperateResult"/>
/// of the operation.
/// </returns>
public
virtual
Task
<
OperateResult
>
Update
Message
Async
(
TMessage
message
)
{
public
virtual
Task
<
OperateResult
>
UpdateAsync
(
TMessage
message
)
{
ThrowIfDisposed
();
//todo: validation message fileds is correct
...
...
@@ -90,7 +90,7 @@ namespace Cap.Consistency
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="OperateResult"/>
/// of the operation.
/// </returns>
public
virtual
Task
<
OperateResult
>
Delete
Message
Async
(
TMessage
message
)
{
public
virtual
Task
<
OperateResult
>
DeleteAsync
(
TMessage
message
)
{
ThrowIfDisposed
();
if
(
message
==
null
)
{
...
...
test/Cap.Consistency.EntityFrameworkCore.Test/Utilities/ScratchDatabaseFixture.cs
View file @
eb3d9e6f
using
System
;
using
Microsoft.EntityFrameworkCore.Internal
;
namespace
Cap.Consistency.EntityFrameworkCore.Test
.Utilities
namespace
Cap.Consistency.EntityFrameworkCore.Test
{
public
class
ScratchDatabaseFixture
:
IDisposable
{
...
...
test/Shared/MessageManagerTestBase.cs
View file @
eb3d9e6f
...
...
@@ -68,7 +68,7 @@ namespace Cap.Consistency.Test
Assert
.
True
(
operateResult
.
Succeeded
);
var
messageId
=
await
manager
.
GetMessageIdAsync
(
message
);
operateResult
=
await
manager
.
Delete
Message
Async
(
message
);
operateResult
=
await
manager
.
DeleteAsync
(
message
);
Assert
.
Null
(
await
manager
.
FindByIdAsync
(
messageId
));
}
...
...
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