Sfoglia il codice sorgente

refactor

undefined
yangxiaodong 7 anni fa
parent
commit
548e3ec0ab
3 ha cambiato i file con 0 aggiunte e 92 eliminazioni
  1. +0
    -39
      src/Cap.Consistency/KafkaConsistency.cs
  2. +0
    -12
      src/Cap.Consistency/Models/IConsumerModel.cs
  3. +0
    -41
      src/Cap.Consistency/RouteTable.cs

+ 0
- 39
src/Cap.Consistency/KafkaConsistency.cs Vedi File

@@ -1,39 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Cap.Consistency.Consumer;
using Microsoft.Extensions.DependencyInjection;
using System.Threading.Tasks;

namespace Cap.Consistency
{
public class KafkaConsistency : IRoute
{
private IServiceProvider _serviceProvider;
private IEnumerable<IConsumerHandler> _handlers;

public KafkaConsistency(IServiceProvider serviceProvider) {
_serviceProvider = serviceProvider;
}

public void Start() {
_handlers = _serviceProvider.GetServices<IConsumerHandler>();
var services = _serviceProvider.GetServices<IConsumerService>();
foreach (var handler in _handlers) {
handler.Start(services);
}
}

public void Stop() {
foreach (var handler in _handlers) {
handler.Stop();
}
}

public async Task Start() {

}

}
}

+ 0
- 12
src/Cap.Consistency/Models/IConsumerModel.cs Vedi File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Cap.Consistency.Models
{
public interface IConsumerModel
{
string TopicName { get; set; }

}
}

+ 0
- 41
src/Cap.Consistency/RouteTable.cs Vedi File

@@ -1,41 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cap.Consistency.Abstractions;

namespace Cap.Consistency
{
public class RouteTable : IReadOnlyList<ConsumerExecutorDescriptor>
{

public RouteTable() {

}

public RouteTable(List<ConsumerExecutorDescriptor> messageMethods) {
QMessageMethods = messageMethods;
}

public ConsumerExecutorDescriptor this[int index] {
get {
throw new NotImplementedException();
}
}

public int Count {
get {
throw new NotImplementedException();
}
}

public List<ConsumerExecutorDescriptor> QMessageMethods { get; set; }

public IEnumerator<ConsumerExecutorDescriptor> GetEnumerator() {
throw new NotImplementedException();
}

IEnumerator IEnumerable.GetEnumerator() {
throw new NotImplementedException();
}
}
}

Caricamento…
Annulla
Salva