Fixed async task notifications; added more comments; restored CancellationToken methods; removed useless usings
git-svn-id: file:///srv/devel/repo-conversion/nusu@330 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
fdf4442163
commit
a934fb155e
|
@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyProduct("Nuclex.Support")]
|
[assembly: AssemblyProduct("Nuclex.Support")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyCompany("Nuclex Development Labs")]
|
[assembly: AssemblyCompany("Nuclex Development Labs")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Nuclex Development Labs 2008-2013")]
|
[assembly: AssemblyCopyright("Copyright © Nuclex Development Labs 2008-2017")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Nuclex.Support.Async {
|
namespace Nuclex.Support.Async {
|
||||||
|
|
||||||
|
@ -28,11 +29,9 @@ namespace Nuclex.Support.Async {
|
||||||
/// <summary>Executes the action</summary>
|
/// <summary>Executes the action</summary>
|
||||||
void Run();
|
void Run();
|
||||||
|
|
||||||
#if false
|
|
||||||
/// <summary>Executes the action allowing cancellation via a cancellation token</summary>
|
/// <summary>Executes the action allowing cancellation via a cancellation token</summary>
|
||||||
/// <param name="cancellationToken">Cancellation token that can cancel the action</param>
|
/// <param name="cancellationToken">Cancellation token that can cancel the action</param>
|
||||||
void Run(CancellationToken cancellationToken);
|
void Run(CancellationToken cancellationToken);
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Nuclex.Support.Async {
|
namespace Nuclex.Support.Async {
|
||||||
|
|
||||||
|
@ -30,14 +31,12 @@ namespace Nuclex.Support.Async {
|
||||||
/// <param name="option">Option or configuration to switch to</param>
|
/// <param name="option">Option or configuration to switch to</param>
|
||||||
void Switch(TOptions option);
|
void Switch(TOptions option);
|
||||||
|
|
||||||
#if false
|
|
||||||
/// <summary>Switches to a different option or configuration</summary>
|
/// <summary>Switches to a different option or configuration</summary>
|
||||||
/// <param name="option">Option or configuration to switch to</param>
|
/// <param name="option">Option or configuration to switch to</param>
|
||||||
/// <param name="cancellationToken">
|
/// <param name="cancellationToken">
|
||||||
/// Cancellation token by which the switch can be cancelled
|
/// Cancellation token by which the switch can be cancelled
|
||||||
/// </param>
|
/// </param>
|
||||||
void Switch(TOptions option, CancellationToken cancellationToken);
|
void Switch(TOptions option, CancellationToken cancellationToken);
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>Current target option or configuration being switched to</summary>
|
/// <summary>Current target option or configuration being switched to</summary>
|
||||||
TOptions Target { get; }
|
TOptions Target { get; }
|
||||||
|
|
|
@ -25,14 +25,11 @@ namespace Nuclex.Support.Async {
|
||||||
/// <summary>Task that runs in the background or externally</summary>
|
/// <summary>Task that runs in the background or externally</summary>
|
||||||
public interface IAsyncTask {
|
public interface IAsyncTask {
|
||||||
|
|
||||||
/// <summary>Triggered when the process starts running</summary>
|
/// <summary>Triggered when the status of the task changes</summary>
|
||||||
event EventHandler Started;
|
event EventHandler<AsyncStatusEventArgs> StatusChanged;
|
||||||
|
|
||||||
/// <summary>Triggered when the action finishes for any reason</summary>
|
/// <summary>Current status of the asynchronous task</summary>
|
||||||
event EventHandler Finished;
|
AsyncStatus Status { get; }
|
||||||
|
|
||||||
/// <summary>Whether the action is currently running</summary>
|
|
||||||
bool IsRunning { get; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ License along with this library
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ License along with this library
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
#if !NO_SPECIALIZED_COLLECTIONS
|
#if !NO_SPECIALIZED_COLLECTIONS
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,7 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ License along with this library
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
|
@ -21,7 +21,6 @@ License along with this library
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
|
@ -21,7 +21,6 @@ License along with this library
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ License along with this library
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Collections {
|
namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Nuclex.Support.IO {
|
namespace Nuclex.Support.IO {
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ License along with this library
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Nuclex.Support.Licensing {
|
namespace Nuclex.Support.Licensing {
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace Nuclex.Support {
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
[Obsolete("Prefer the C# 'nameof()' operator to using a Linq expression")]
|
||||||
protected void OnPropertyChanged<TProperty>(Expression<Func<TProperty>> property) {
|
protected void OnPropertyChanged<TProperty>(Expression<Func<TProperty>> property) {
|
||||||
PropertyChangedEventHandler copy = PropertyChanged;
|
PropertyChangedEventHandler copy = PropertyChanged;
|
||||||
if(copy != null) {
|
if(copy != null) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ License along with this library
|
||||||
|
|
||||||
#if !NO_CONCURRENT_COLLECTIONS
|
#if !NO_CONCURRENT_COLLECTIONS
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Parsing {
|
namespace Nuclex.Support.Parsing {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Nuclex.Support.Parsing {
|
namespace Nuclex.Support.Parsing {
|
||||||
|
|
|
@ -20,8 +20,6 @@ License along with this library
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Parsing {
|
namespace Nuclex.Support.Parsing {
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
#if UNITTEST
|
#if UNITTEST
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using Nuclex.Support.Collections;
|
|
||||||
|
|
||||||
namespace Nuclex.Support.Parsing {
|
namespace Nuclex.Support.Parsing {
|
||||||
|
|
||||||
/// <summary>Parses and stores an application's command line parameters</summary>
|
/// <summary>Parses and stores an application's command line parameters</summary>
|
||||||
|
|
|
@ -72,6 +72,7 @@ namespace Nuclex.Support {
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
[Obsolete("Prefer the C# 'nameof()' operator to using a Linq expression")]
|
||||||
public static PropertyChangedEventArgs GetArgumentsFor<TValue>(
|
public static PropertyChangedEventArgs GetArgumentsFor<TValue>(
|
||||||
Expression<Func<TValue>> property
|
Expression<Func<TValue>> property
|
||||||
) {
|
) {
|
||||||
|
@ -160,6 +161,7 @@ namespace Nuclex.Support {
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
[Obsolete("Prefer the C# 'nameof()' operator to using a Linq expression")]
|
||||||
public static bool AreAffecting<TValue>(
|
public static bool AreAffecting<TValue>(
|
||||||
this PropertyChangedEventArgs arguments, Expression<Func<TValue>> property
|
this PropertyChangedEventArgs arguments, Expression<Func<TValue>> property
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
|
@ -19,7 +19,6 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace Nuclex.Support {
|
namespace Nuclex.Support {
|
||||||
|
|
|
@ -19,9 +19,7 @@ License along with this library
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
#if !USE_XMLDOCUMENT
|
#if !USE_XMLDOCUMENT
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user