Commit 1fef4110 authored by yangxiaodong's avatar yangxiaodong

Rename files name.

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