示例#1
0
 /* ----------------------------------------------------------------- */
 ///
 /// SetOverwrite
 ///
 /// <summary>
 /// Subscribes the message to select the overwrite method.
 /// </summary>
 ///
 /// <param name="src">Source ViewModel.</param>
 /// <param name="value">
 /// Overwrite method to set when requested.
 /// </param>
 ///
 /// <returns>Object to clear the subscription.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static IDisposable SetOverwrite(this ExtractViewModel src, OverwriteMethod value) =>
 src.Subscribe <QueryMessage <OverwriteQuerySource, OverwriteMethod> >(e =>
 {
     e.Value  = value;
     e.Cancel = false;
 });