protected UnrealAgent(IUnrealAgentLogger log, string engineRoot, string gameRoot) { this.engineRoot = engineRoot; this.gameRoot = gameRoot; this.agentFile = Path.Combine(gameRoot, ".monoue-ide"); this.Log = log; }
//ensures exceptions are observed static Task <T> LogExceptions <T>(IUnrealAgentLogger log, Task <T> task) { task.ContinueWith(t => { log.Error(t.Exception.Flatten().InnerException, "Error in task"); }, TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously); return(task); }
public UnrealAgentConnection( IUnrealAgentLogger log, TcpClient client, Func <string, string[], bool> commandHandler, Action <UnrealAgentConnection> disposedHandler) { this.log = log; this.client = client; this.commandHandler = commandHandler; this.disposedHandler = disposedHandler; }
protected UnrealAgentClient(IUnrealAgentLogger log, string engineRoot, string gameRoot, string config) : base(log, engineRoot, gameRoot) { Configuration = config; fsw = new FileSystemWatcher(Path.GetDirectoryName(AgentFile), Path.GetFileName(AgentFile)); //ignore create, the file will be empty until changed fsw.Changed += CheckAgent; fsw.Deleted += CheckAgent; fsw.EnableRaisingEvents = true; CheckAgent(); }
public VSUnrealAgent(IUnrealAgentLogger log, string engineRoot, string gameRoot, string config) : base(log, engineRoot, gameRoot, config) { }