7. Windows
WinForms, WPF
Mac
Xamarin.Mac
Windows Tablet
Windows Store Application
Web Application
ASP.NET MVC, OWIN
Cloud
Microsoft Azure, AWS, GCP(Google)
C# Everywhere
Game
Unity, Paradox, Unreal Engine
Mobile
Xamarin.iOS
Xamarin.Android
Windows Phone 8 SDK
Embedded
Windows Embedded
.NET Micro Framework
NUI
Kinect, LeapMotion
15. ただのConsoleApplicationランナー
/// <summary>
/// 各バッチはこれを継承する、というマーカー的なもの
/// </summary>
public interface IBatchExecutor
{
void Execute(string[] args);
}
// 引数にクラス名渡してもらって、それ実行するだけ
// コア部分はこれだけ。その前後に起動/終了の通知や多重実行禁止、実行時間計測がある程度
var targetClass = args[0];
var type = Assembly.GetCallingAssembly().GetType(targetClass, throwOnError: true);
var batch = (IBatchExecutor)Activator.CreateInstance(type);
batch.Execute(args.Skip(1).ToArray()); // 第一引数(型名)以外を渡す
16. TypedConnection
http://neue.cc/2013/08/06_423.html
public interface ITypedConnection : IDisposable
{
DbConnection Slave { get; }
DbConnection Master { get; }
}
public BattleEntity SelectById(BattleConnection battle, int id)
{
return battle.Master.Query<BattleEntity>("select * from battle where id = @id", new { id });
}
public UserEntity SelectById(UserInfoConnection user, int id)
{
return user.Master.Query<UserEntity>("select * from user where id = @id", new { id });
}