31 lines
684 B
C#
31 lines
684 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BITKit
|
|
{
|
|
/// <summary>
|
|
/// 执行接口,发布者下发任务
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
public interface IExcutor<T>
|
|
{
|
|
bool TryExcute(T value);
|
|
}
|
|
/// <summary>
|
|
/// 发布接口,向发布者下发任务
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
public interface IRequestor<T>
|
|
{
|
|
/// <summary>
|
|
/// 执行任务
|
|
/// </summary>
|
|
/// <param name="value"></param>
|
|
/// <returns></returns>
|
|
bool Excute(T value);
|
|
}
|
|
}
|