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
ab4eca96
Commit
ab4eca96
authored
May 18, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
548e3ec0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
51 deletions
+2
-51
ConsistencyDbContext.cs
...p.Consistency.EntityFrameworkCore/ConsistencyDbContext.cs
+1
-0
ConsistencyMessage.cs
...Cap.Consistency.EntityFrameworkCore/ConsistencyMessage.cs
+0
-51
ConsistencyMessageStore.cs
...onsistency.EntityFrameworkCore/ConsistencyMessageStore.cs
+1
-0
No files found.
src/Cap.Consistency.EntityFrameworkCore/ConsistencyDbContext.cs
View file @
ab4eca96
using
System
;
using
Cap.Consistency.Infrastructure
;
using
Microsoft.EntityFrameworkCore
;
namespace
Cap.Consistency.EntityFrameworkCore
...
...
src/Cap.Consistency.EntityFrameworkCore/ConsistencyMessage.cs
deleted
100644 → 0
View file @
548e3ec0
using
System
;
namespace
Cap.Consistency.EntityFrameworkCore
{
/// <summary>
/// The default implementation of <see cref="ConsistencyMessage{TKey}"/> which uses a string as a primary key.
/// </summary>
public
class
ConsistencyMessage
:
ConsistencyMessage
<
string
>
{
/// <summary>
/// Initializes a new instance of <see cref="ConsistencyMessage"/>.
/// </summary>
/// <remarks>
/// The Id property is initialized to from a new GUID string value.
/// </remarks>
public
ConsistencyMessage
()
{
Id
=
Guid
.
NewGuid
().
ToString
();
SendTime
=
DateTime
.
Now
;
UpdateTime
=
SendTime
;
Status
=
MessageStatus
.
WaitForSend
;
}
}
/// <summary>
/// ConsistencyMessage consume status
/// </summary>
public
enum
MessageStatus
{
Deleted
=
0
,
WaitForSend
=
1
,
RollbackSuccessed
=
3
,
RollbackFailed
=
4
}
/// <summary>
/// Represents a message in the consistency system
/// </summary>
/// <typeparam name="TKey">The type used for the primary key for the message.</typeparam>
public
class
ConsistencyMessage
<
TKey
>
where
TKey
:
IEquatable
<
TKey
>
{
public
virtual
TKey
Id
{
get
;
set
;
}
public
virtual
DateTime
SendTime
{
get
;
set
;
}
public
string
Payload
{
get
;
set
;
}
public
MessageStatus
Status
{
get
;
set
;
}
public
virtual
DateTime
?
UpdateTime
{
get
;
set
;
}
}
}
\ No newline at end of file
src/Cap.Consistency.EntityFrameworkCore/ConsistencyMessageStore.cs
View file @
ab4eca96
...
...
@@ -2,6 +2,7 @@
using
System.ComponentModel
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Cap.Consistency.Infrastructure
;
using
Microsoft.EntityFrameworkCore
;
namespace
Cap.Consistency.EntityFrameworkCore
...
...
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