PortProxyGUI/PortProxyGUI.Shared/~extern/NStandard/XObject.cs

24 lines
596 B
C#
Raw Normal View History

2020-05-29 03:32:44 +08:00
using System;
using System.ComponentModel;
namespace PortProxyGUI._extern.NStandard
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class XObject
{
/// <summary>
/// Do a task for itself, then return itself.
/// </summary>
/// <typeparam name="TSelf"></typeparam>
/// <param name="this"></param>
/// <param name="task"></param>
/// <returns></returns>
public static TSelf Then<TSelf>(this TSelf @this, Action<TSelf> task)
{
task(@this);
return @this;
}
}
}