Commit 1fef4110 authored by yangxiaodong's avatar yangxiaodong

Rename files name.

parent 3c2f51e8
...@@ -32,8 +32,8 @@ namespace Sample.Kafka ...@@ -32,8 +32,8 @@ namespace Sample.Kafka
x.HostName = "192.168.2.206"; x.HostName = "192.168.2.206";
x.UserName = "admin"; x.UserName = "admin";
x.Password = "123123"; x.Password = "123123";
}); })
//.AddKafka(); .AddKafka(x => x.Servers = "");
// Add framework services. // Add framework services.
services.AddMvc(); services.AddMvc();
......
...@@ -7,7 +7,7 @@ namespace Microsoft.Extensions.DependencyInjection ...@@ -7,7 +7,7 @@ namespace Microsoft.Extensions.DependencyInjection
/// <summary> /// <summary>
/// Contains extension methods to <see cref="CapBuilder"/> for adding entity framework stores. /// Contains extension methods to <see cref="CapBuilder"/> for adding entity framework stores.
/// </summary> /// </summary>
public static class ConsistencyEntityFrameworkBuilderExtensions public static class CapEntityFrameworkBuilderExtensions
{ {
/// <summary> /// <summary>
/// Adds an Entity Framework implementation of message stores. /// Adds an Entity Framework implementation of message stores.
......
...@@ -4,22 +4,22 @@ using Microsoft.EntityFrameworkCore; ...@@ -4,22 +4,22 @@ using Microsoft.EntityFrameworkCore;
namespace DotNetCore.CAP.EntityFrameworkCore namespace DotNetCore.CAP.EntityFrameworkCore
{ {
/// <summary> /// <summary>
/// Base class for the Entity Framework database context used for consistency. /// Base class for the Entity Framework database context used for CAP.
/// </summary> /// </summary>
/// <typeparam name="TMessage">The type of message objects.</typeparam> /// <typeparam name="TMessage">The type of message objects.</typeparam>
/// <typeparam name="Tkey">The type of the primarky key for messages.</typeparam> /// <typeparam name="Tkey">The type of the primarky key for messages.</typeparam>
public class ConsistencyDbContext : DbContext public class CapDbContext : DbContext
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConsistencyDbContext"/>. /// Initializes a new instance of the <see cref="CapDbContext"/>.
/// </summary> /// </summary>
public ConsistencyDbContext() { } public CapDbContext() { }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConsistencyDbContext"/>. /// Initializes a new instance of the <see cref="CapDbContext"/>.
/// </summary> /// </summary>
/// <param name="options">The options to be used by a <see cref="DbContext"/>.</param> /// <param name="options">The options to be used by a <see cref="DbContext"/>.</param>
public ConsistencyDbContext(DbContextOptions options) : base(options) { } public CapDbContext(DbContextOptions options) : base(options) { }
/// <summary> /// <summary>
/// Gets or sets the <see cref="DbSet{ConsistencyMessage}"/> of Messages. /// Gets or sets the <see cref="DbSet{ConsistencyMessage}"/> of Messages.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Include="Job\IProcessor.CronJob.cs" /> <None Include="Job\IJobProcessor.CronJob.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
{ {
public class CapReceivedMessage : CapMessage public class CapReceivedMessage : CapMessage
{ {
public CapReceivedMessage()
{
}
public CapReceivedMessage(MessageBase baseMessage) : base(baseMessage) public CapReceivedMessage(MessageBase baseMessage) : base(baseMessage)
{ {
} }
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
{ {
public class CapSentMessage : CapMessage public class CapSentMessage : CapMessage
{ {
} }
} }
\ No newline at end of file
...@@ -13,14 +13,15 @@ namespace DotNetCore.CAP ...@@ -13,14 +13,15 @@ namespace DotNetCore.CAP
{ {
public class JobProcessingServer : IProcessingServer, IDisposable public class JobProcessingServer : IProcessingServer, IDisposable
{ {
private ILogger _logger; private readonly ILogger _logger;
private ILoggerFactory _loggerFactory; private readonly ILoggerFactory _loggerFactory;
private IServiceProvider _provider; private readonly IServiceProvider _provider;
private readonly CancellationTokenSource _cts;
private readonly CapOptions _options;
private readonly DefaultCronJobRegistry _defaultJobRegistry;
private IJobProcessor[] _processors; private IJobProcessor[] _processors;
private CancellationTokenSource _cts;
private CapOptions _options;
private ProcessingContext _context; private ProcessingContext _context;
private DefaultCronJobRegistry _defaultJobRegistry;
private Task _compositeTask; private Task _compositeTask;
private bool _disposed; private bool _disposed;
......
...@@ -9,34 +9,29 @@ namespace DotNetCore.CAP.Job ...@@ -9,34 +9,29 @@ namespace DotNetCore.CAP.Job
{ {
private IServiceScope _scope; private IServiceScope _scope;
public ProcessingContext()
{
}
private ProcessingContext(ProcessingContext other) private ProcessingContext(ProcessingContext other)
{ {
Provider = other.Provider; Provider = other.Provider;
//Storage = other.Storage;
CronJobRegistry = other.CronJobRegistry; CronJobRegistry = other.CronJobRegistry;
CancellationToken = other.CancellationToken; CancellationToken = other.CancellationToken;
} }
public ProcessingContext()
{
}
public ProcessingContext( public ProcessingContext(
IServiceProvider provider, IServiceProvider provider,
//IStorage storage,
CronJobRegistry cronJobRegistry, CronJobRegistry cronJobRegistry,
CancellationToken cancellationToken) CancellationToken cancellationToken)
{ {
Provider = provider; Provider = provider;
//Storage = storage;
CronJobRegistry = cronJobRegistry; CronJobRegistry = cronJobRegistry;
CancellationToken = cancellationToken; CancellationToken = cancellationToken;
} }
public IServiceProvider Provider { get; private set; } public IServiceProvider Provider { get; private set; }
//public IStorage Storage { get; }
public CronJobRegistry CronJobRegistry { get; private set; } public CronJobRegistry CronJobRegistry { get; private set; }
public CancellationToken CancellationToken { get; } public CancellationToken CancellationToken { get; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment