gpt4 book ai didi

c# - 好的类(class)名称的想法

转载 作者:太空宇宙 更新时间:2023-11-03 22:19:21 24 4
gpt4 key购买 nike

您如何命名具有以下公共(public)接口(interface)的类:

/// <summary>
/// Enqeues and exectutes actions synchronously on seperated threads using the <see cref="ThreadPool"/>.
/// </summary>
/// <remarks>
/// Syncronism is guaranteed on a per-instance base in that each enqued action will be executed
/// after the previous action has completed execution for each instance of <see cref="ThreadPoolExectutor" />
/// </remarks>
internal class ThreadPoolExectutor
{
/// <summary>
/// Initializes a new instance of the <see cref="ThreadPoolExectutor"/> class.
/// </summary>
/// <param name="capacity">The absolute (not the initial) number of elements that the <see cref="ThreadPoolExectutor"/> can contain.</param>
public ThreadPoolExectutor(int capacity)

/// <summary>
/// Occurs when exception occured during execution.
/// </summary>
public event EventHandler<ExceptionEventArgs> ExceptionOccurred;

/// <summary>
/// Enqueues a new action with a single parameter for execution on the thread pool.
/// </summary>
/// <param name="action">
/// The action to enqueue for execution.
/// </param>
/// <param name="param">
/// The parameter for the action.
/// </param>
/// <typeparam name="TArg">
/// The type of the <paramref name="param"/>.
/// </typeparam>
public void Execute<TArg>(Action<TArg> action, TArg param)

/// <summary>
/// Enqueues a new action with no parameters for execution on the thread pool.
/// </summary>
/// <param name="action">
/// The action to enqueue for execution.
/// </param>
public void Execute(Action action)
}

最佳答案

Enqeues and exectutes actions

我会称之为ThreadPoolDispatcher

关于c# - 好的类(class)名称的想法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3778317/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com