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
e76a4299
Commit
e76a4299
authored
Aug 17, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
21bf869b
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
38 additions
and
27 deletions
+38
-27
CAP.KafkaOptions.cs
src/DotNetCore.CAP.Kafka/CAP.KafkaOptions.cs
+1
-1
KafkaConsumerClientFactory.cs
src/DotNetCore.CAP.Kafka/KafkaConsumerClientFactory.cs
+1
-4
CAP.MySqlCapOptionsExtension.cs
src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs
+1
-1
CapPublisher.cs
src/DotNetCore.CAP.MySql/CapPublisher.cs
+4
-3
CAP.PostgreSqlCapOptionsExtension.cs
...tCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs
+1
-1
CapPublisher.cs
src/DotNetCore.CAP.PostgreSql/CapPublisher.cs
+5
-5
IAdditionalProcessor.Default.cs
...DotNetCore.CAP.PostgreSql/IAdditionalProcessor.Default.cs
+1
-1
CapPublisher.cs
src/DotNetCore.CAP.SqlServer/CapPublisher.cs
+3
-3
CapPublisherBase.cs
src/DotNetCore.CAP/Abstractions/CapPublisherBase.cs
+1
-1
ObjectId.cs
src/DotNetCore.CAP/Infrastructure/ObjectId.cs
+7
-1
ConsumerInvokerFactory.cs
src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs
+1
-1
IModelBinder.ComplexType.cs
src/DotNetCore.CAP/Internal/IModelBinder.ComplexType.cs
+0
-1
MethodBindException.cs
src/DotNetCore.CAP/Internal/MethodBindException.cs
+12
-4
No files found.
src/DotNetCore.CAP.Kafka/CAP.KafkaOptions.cs
View file @
e76a4299
src/DotNetCore.CAP.Kafka/KafkaConsumerClientFactory.cs
View file @
e76a4299
using
System
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP.Kafka
namespace
DotNetCore.CAP.Kafka
{
internal
sealed
class
KafkaConsumerClientFactory
:
IConsumerClientFactory
{
...
...
src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs
View file @
e76a4299
src/DotNetCore.CAP.MySql/CapPublisher.cs
View file @
e76a4299
...
...
@@ -69,6 +69,7 @@ namespace DotNetCore.CAP.MySql
await
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
}
}
#
region
private
methods
private
string
PrepareSql
()
...
...
src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs
View file @
e76a4299
using
System
;
using
DotNetCore.CAP.Processor
;
using
DotNetCore.CAP.PostgreSql
;
using
DotNetCore.CAP.Processor
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.DependencyInjection
;
...
...
src/DotNetCore.CAP.PostgreSql/CapPublisher.cs
View file @
e76a4299
...
...
@@ -2,8 +2,8 @@
using
System.Data
;
using
System.Threading.Tasks
;
using
Dapper
;
using
DotNetCore.CAP.Models
;
using
DotNetCore.CAP.Abstractions
;
using
DotNetCore.CAP.Models
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Storage
;
using
Microsoft.Extensions.Logging
;
...
...
@@ -77,6 +77,6 @@ namespace DotNetCore.CAP.PostgreSql
return
$"INSERT INTO \"
{
_options
.
Schema
}
\".\"published\" (\"Name\",\"Content\",\"Retries\",\"Added\",\"ExpiresAt\",\"StatusName\")VALUES(@Name,@Content,@Retries,@Added,@ExpiresAt,@StatusName)"
;
}
#
endregion
#
endregion
private
methods
}
}
\ No newline at end of file
src/DotNetCore.CAP.PostgreSql/IAdditionalProcessor.Default.cs
View file @
e76a4299
src/DotNetCore.CAP.SqlServer/CapPublisher.cs
View file @
e76a4299
src/DotNetCore.CAP/Abstractions/CapPublisherBase.cs
View file @
e76a4299
src/DotNetCore.CAP/Infrastructure/ObjectId.cs
View file @
e76a4299
...
...
@@ -16,12 +16,14 @@ namespace DotNetCore.CAP
{
// private static fields
private
static
readonly
DateTime
__unixEpoch
;
private
static
readonly
long
__dateTimeMaxValueMillisecondsSinceEpoch
;
private
static
readonly
long
__dateTimeMinValueMillisecondsSinceEpoch
;
private
static
ObjectId
__emptyInstance
=
default
(
ObjectId
);
private
static
int
__staticMachine
;
private
static
short
__staticPid
;
private
static
int
__staticIncrement
;
// high byte will be masked out when generating new ObjectId
private
static
uint
[]
_lookup32
=
Enumerable
.
Range
(
0
,
256
).
Select
(
i
=>
{
string
s
=
i
.
ToString
(
"x2"
);
...
...
@@ -32,6 +34,7 @@ namespace DotNetCore.CAP
// the extra two bytes are not visible to anyone outside of this class and they buy us considerable simplification
// an additional advantage of this representation is that it will serialize to JSON without any 64 bit overflow problems
private
int
_timestamp
;
private
int
_machine
;
private
short
_pid
;
private
int
_increment
;
...
...
@@ -475,6 +478,7 @@ namespace DotNetCore.CAP
return
arr
;
}
/// <summary>
/// Converts a byte array to a hex string.
/// </summary>
...
...
@@ -495,6 +499,7 @@ namespace DotNetCore.CAP
}
return
new
string
(
result
);
}
/// <summary>
/// Converts a DateTime to number of milliseconds since Unix epoch.
/// </summary>
...
...
@@ -505,6 +510,7 @@ namespace DotNetCore.CAP
var
utcDateTime
=
ToUniversalTime
(
dateTime
);
return
(
utcDateTime
-
__unixEpoch
).
Ticks
/
10000
;
}
/// <summary>
/// Converts a DateTime to UTC (with special handling for MinValue and MaxValue).
/// </summary>
...
...
src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs
View file @
e76a4299
...
...
@@ -23,7 +23,7 @@ namespace DotNetCore.CAP.Internal
public
IConsumerInvoker
CreateInvoker
(
ConsumerContext
consumerContext
)
{
using
(
var
scope
=
_serviceProvider
.
CreateScope
())
using
(
var
scope
=
_serviceProvider
.
CreateScope
())
{
var
context
=
new
ConsumerInvokerContext
(
consumerContext
)
{
...
...
src/DotNetCore.CAP/Internal/IModelBinder.ComplexType.cs
View file @
e76a4299
...
...
@@ -3,7 +3,6 @@ using System.Reflection;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Abstractions.ModelBinding
;
using
DotNetCore.CAP.Infrastructure
;
using
DotNetCore.CAP.Models
;
namespace
DotNetCore.CAP.Internal
{
...
...
src/DotNetCore.CAP/Internal/MethodBindException.cs
View file @
e76a4299
...
...
@@ -5,8 +5,16 @@ namespace DotNetCore.CAP.Internal
[
Serializable
]
public
class
MethodBindException
:
Exception
{
public
MethodBindException
()
{
}
public
MethodBindException
(
string
message
)
:
base
(
message
)
{
}
public
MethodBindException
(
string
message
,
Exception
inner
)
:
base
(
message
,
inner
)
{
}
public
MethodBindException
()
{
}
public
MethodBindException
(
string
message
)
:
base
(
message
)
{
}
public
MethodBindException
(
string
message
,
Exception
inner
)
:
base
(
message
,
inner
)
{
}
}
}
\ No newline at end of file
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