public static MemoryImageMediaItem CreateDummyMediaItem()
=> new MemoryImageMediaItem(CreateDummyImage());
- public static void FireEvent<T>(T control, string eventName) where T : Control
+ public static void FireEvent<T>(T control, string eventName)
+ where T : Control
=> TestUtils.FireEvent(control, eventName, EventArgs.Empty);
- public static void FireEvent<T>(T control, string eventName, EventArgs e) where T : Control
+ public static void FireEvent<T>(T control, string eventName, EventArgs e)
+ where T : Control
{
var methodName = "On" + eventName;
var method = typeof(T).GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
method.Invoke(control, new[] { e });
}
- public static void Validate<T>(T control) where T : Control
+ public static void Validate<T>(T control)
+ where T : Control
{
var cancelEventArgs = new CancelEventArgs();
TestUtils.FireEvent(control, "Validating", cancelEventArgs);
}
}
- public T? GetTabByType<T>() where T : TabModel
+ public T? GetTabByType<T>()
+ where T : TabModel
{
lock (this.LockObj)
return this.Tabs.OfType<T>().FirstOrDefault();
}
}
- public T[] GetTabsByType<T>() where T : TabModel
+ public T[] GetTabsByType<T>()
+ where T : TabModel
{
lock (this.LockObj)
return this.Tabs.OfType<T>().ToArray();
namespace OpenTween
{
- abstract public class SettingBase<T> where T : class, new()
+ abstract public class SettingBase<T>
+ where T : class, new()
{
/// <summary>
/// XML に含まれる追加データを保持するフィールド
}
/// <summary>指定された型 <typeparamref name="T"/> に合致する全てのタブを更新します</summary>
- private Task RefreshTabAsync<T>() where T : TabModel
+ private Task RefreshTabAsync<T>()
+ where T : TabModel
=> this.RefreshTabAsync<T>(backward: false);
/// <summary>指定された型 <typeparamref name="T"/> に合致する全てのタブを更新します</summary>
- private Task RefreshTabAsync<T>(bool backward) where T : TabModel
+ private Task RefreshTabAsync<T>(bool backward)
+ where T : TabModel
{
var loadTasks =
from tab in this._statuses.GetTabsByType<T>()
+ "This software was created by The OpenTween Project, based on Tween v1.1.0.0, which is licensed under GPLv3.";
}
- protected T GetApplicationAttribute<T>() where T : Attribute
+ protected T GetApplicationAttribute<T>()
+ where T : Attribute
{
var currentAssembly = Assembly.GetExecutingAssembly();