Ejemplo n.º 1
0
 /// <summary>
 /// Undeletes a file from the network via Administrative Restore
 /// </summary>
 /// <param name="file">
 /// The address of the file to restore.
 /// </param>
 /// <param name="configure">
 /// Optional callback method providing an opportunity to modify
 /// the execution configuration for just this method call.
 /// It is executed prior to submitting the request to the network.
 /// </param>
 /// <returns>
 /// A transaction record indicating success of the file deletion,
 /// fees & other transaction details.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">If required arguments are missing.</exception>
 /// <exception cref="InvalidOperationException">If required context configuration is missing.</exception>
 /// <exception cref="PrecheckException">If the gateway node create rejected the request upon submission.</exception>
 /// <exception cref="ConsensusException">If the network was unable to come to consensus before the duration of the transaction expired.</exception>
 /// <exception cref="TransactionException">If the network rejected the create request as invalid or had missing data.</exception>
 public async Task <TransactionRecord> SystemRestoreFileWithRecordAsync(Address file, Action <IContext>?configure = null)
 {
     return(new TransactionRecord(await ExecuteTransactionAsync(SystemUndeleteTransactionBody.FromFile(file), configure, true).ConfigureAwait(false)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Undeletes a file from the network via Administrative Restore
 /// </summary>
 /// <param name="file">
 /// The address of the file to restore.
 /// </param>
 /// <param name="signatory">
 /// Typically private key, keys or signing callback method that
 /// are needed to delete the file as per the requirements in the
 /// associated Endorsement.
 /// </param>
 /// <param name="configure">
 /// Optional callback method providing an opportunity to modify
 /// the execution configuration for just this method call.
 /// It is executed prior to submitting the request to the network.
 /// </param>
 /// <returns>
 /// A transaction receipt indicating success of the file deletion.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">If required arguments are missing.</exception>
 /// <exception cref="InvalidOperationException">If required context configuration is missing.</exception>
 /// <exception cref="PrecheckException">If the gateway node create rejected the request upon submission.</exception>
 /// <exception cref="ConsensusException">If the network was unable to come to consensus before the duration of the transaction expired.</exception>
 /// <exception cref="TransactionException">If the network rejected the create request as invalid or had missing data.</exception>
 public async Task <TransactionReceipt> SystemRestoreFileAsync(Address file, Signatory signatory, Action <IContext>?configure = null)
 {
     return(new TransactionReceipt(await ExecuteTransactionAsync(SystemUndeleteTransactionBody.FromFile(file), configure, false, signatory).ConfigureAwait(false)));
 }