/// <summary> /// Download the whole voting from the server and /// store it in files. /// </summary> /// <param name="votingId">Id of the voting.</param> /// <param name="votingId">Path where program data is stored.</param> /// <param name="callBack">Callback upon completion.</param> public void DownloadVoting(Guid votingId, string dataPath, DownloadVotingCallBack callBack) { lock (this.operations) { this.operations.Enqueue(new DownloadVotingOperation(votingId, dataPath, callBack)); } }
/// <summary> /// Create a new result get operation. /// </summary> /// <param name="votingId">Id of the voting.</param> /// <param name="votingId">Path where program data is stored.</param> /// <param name="callBack">Callback upon completion.</param> public DownloadVotingOperation(Guid votingId, string dataPath, DownloadVotingCallBack callBack) { this.votingId = votingId; this.callBack = callBack; this.offlinePath = Path.Combine(dataPath, votingId.ToString()); }