public override void Deserialize(Stream stream) { var reader = new BinaryReader(stream, InedoLib.UTF8Encoding); this.Command = (ClientCommand)reader.ReadInt32(); this.Context = (RemoteLibGitSharpContext) new BinaryFormatter().Deserialize(stream); }
private async Task <object> ExecuteRemoteAsync(ClientCommand command, RemoteLibGitSharpContext context) { context.WorkingDirectory = this.workingDirectory; context.Simulation = this.simulation; context.LocalRepositoryPath = this.repository.LocalRepositoryPath; context.RemoteRepositoryUrl = this.repository.RemoteRepositoryUrl; context.UserName = this.repository.UserName; context.Password = this.repository.Password?.ToUnsecureString(); var job = new RemoteLibGitSharpJob(); job.MessageLogged += Job_MessageLogged; job.Command = command; job.Context = context; var result = await this.jobExecuter.ExecuteJobAsync(job, this.cancellationToken).ConfigureAwait(false); return(result); }