// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System.Reactive.Concurrency;
using System.Threading;
#if !NO_TPL
using System.Threading.Tasks;
#endif
namespace System.Reactive.Linq
{
public static partial class Observable
{
#region FromAsyncPattern
#region Func
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
#if !NO_LARGEARITY
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The type of the thirteenth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The type of the thirteenth argument passed to the begin delegate.
/// The type of the fourteenth argument passed to the begin delegate.
/// The type of the result returned by the end delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Func end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
#endif
#endregion
#region Action
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
#if !NO_LARGEARITY
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The type of the thirteenth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
///
/// Converts a Begin/End invoke function pair into an asynchronous function.
///
/// The type of the first argument passed to the begin delegate.
/// The type of the second argument passed to the begin delegate.
/// The type of the third argument passed to the begin delegate.
/// The type of the fourth argument passed to the begin delegate.
/// The type of the fifth argument passed to the begin delegate.
/// The type of the sixth argument passed to the begin delegate.
/// The type of the seventh argument passed to the begin delegate.
/// The type of the eighth argument passed to the begin delegate.
/// The type of the ninth argument passed to the begin delegate.
/// The type of the tenth argument passed to the begin delegate.
/// The type of the eleventh argument passed to the begin delegate.
/// The type of the twelfth argument passed to the begin delegate.
/// The type of the thirteenth argument passed to the begin delegate.
/// The type of the fourteenth argument passed to the begin delegate.
/// The delegate that begins the asynchronous operation.
/// The delegate that ends the asynchronous operation.
/// Function that can be used to start the asynchronous operation and retrieve the result (represented as a Unit value) as an observable sequence.
/// or is null.
/// Each invocation of the resulting function will cause the asynchronous operation to be started. Subscription to the resulting sequence has no observable side-effect, and each subscription will produce the asynchronous operation's result.
#if PREFER_ASYNC
[Obsolete(Constants_Linq.USE_TASK_FROMASYNCPATTERN)]
#endif
public static Func> FromAsyncPattern(Func begin, Action end)
{
if (begin == null)
throw new ArgumentNullException("begin");
if (end == null)
throw new ArgumentNullException("end");
return s_impl.FromAsyncPattern(begin, end);
}
#endif
#endregion
#endregion
#region Start[Async]
#region Func
///
/// Invokes the specified function asynchronously, surfacing the result through an observable sequence.
///
/// The type of the result returned by the function.
/// Function to run asynchronously.
/// An observable sequence exposing the function's result value, or an exception.
/// is null.
///
///
/// - The function is called immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the function's result.
///
///
public static IObservable Start(Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.Start(function);
}
///
/// Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence
///
/// The type of the result returned by the function.
/// Function to run asynchronously.
/// Scheduler to run the function on.
/// An observable sequence exposing the function's result value, or an exception.
/// or is null.
///
///
/// - The function is called immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the function's result.
///
///
public static IObservable Start(Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.Start(function, scheduler);
}
#if !NO_TPL
///
/// Invokes the asynchronous function, surfacing the result through an observable sequence.
///
/// The type of the result returned by the asynchronous function.
/// Asynchronous function to run.
/// An observable sequence exposing the function's result value, or an exception.
/// is null.
///
///
/// - The function is started immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the function's result.
///
///
public static IObservable StartAsync(Func> functionAsync)
{
if (functionAsync == null)
throw new ArgumentNullException("functionAsync");
return s_impl.StartAsync(functionAsync);
}
///
/// Invokes the asynchronous function, surfacing the result through an observable sequence.
/// The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.
///
/// The type of the result returned by the asynchronous function.
/// Asynchronous function to run.
/// An observable sequence exposing the function's result value, or an exception.
/// is null.
///
///
/// - The function is started immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the function's result.
/// -
/// If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed
/// subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator.
/// Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription
/// to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using
/// multicast operators.
///
///
///
public static IObservable StartAsync(Func> functionAsync)
{
if (functionAsync == null)
throw new ArgumentNullException("functionAsync");
return s_impl.StartAsync(functionAsync);
}
#endif
#endregion
#region Action
///
/// Invokes the action asynchronously, surfacing the result through an observable sequence.
///
/// Action to run asynchronously.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// is null.
///
///
/// - The action is called immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the action's outcome.
///
///
public static IObservable Start(Action action)
{
if (action == null)
throw new ArgumentNullException("action");
return s_impl.Start(action);
}
///
/// Invokes the action asynchronously on the specified scheduler, surfacing the result through an observable sequence.
///
/// Action to run asynchronously.
/// Scheduler to run the action on.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// or is null.
///
///
/// - The action is called immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the action's outcome.
///
///
public static IObservable Start(Action action, IScheduler scheduler)
{
if (action == null)
throw new ArgumentNullException("action");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.Start(action, scheduler);
}
#if !NO_TPL
///
/// Invokes the asynchronous action, surfacing the result through an observable sequence.
///
/// Asynchronous action to run.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// is null.
///
///
/// - The action is started immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the action's outcome.
///
///
public static IObservable StartAsync(Func actionAsync)
{
if (actionAsync == null)
throw new ArgumentNullException("actionAsync");
return s_impl.StartAsync(actionAsync);
}
///
/// Invokes the asynchronous action, surfacing the result through an observable sequence.
/// The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.
///
/// Asynchronous action to run.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// is null.
///
///
/// - The action is started immediately, not during the subscription of the resulting sequence.
/// - Multiple subscriptions to the resulting sequence can observe the action's outcome.
/// -
/// If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed
/// subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator.
/// Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription
/// to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using
/// multicast operators.
///
///
///
public static IObservable StartAsync(Func actionAsync)
{
if (actionAsync == null)
throw new ArgumentNullException("actionAsync");
return s_impl.StartAsync(actionAsync);
}
#endif
#endregion
#endregion
#region FromAsync
#if !NO_TPL
#region Func
///
/// Converts to asynchronous function into an observable sequence. Each subscription to the resulting sequence causes the function to be started.
///
/// The type of the result returned by the asynchronous function.
/// Asynchronous function to convert.
/// An observable sequence exposing the result of invoking the function, or an exception.
/// is null.
public static IObservable FromAsync(Func> functionAsync)
{
return s_impl.FromAsync(functionAsync);
}
///
/// Converts to asynchronous function into an observable sequence. Each subscription to the resulting sequence causes the function to be started.
/// The CancellationToken passed to the asynchronous function is tied to the observable sequence's subscription that triggered the function's invocation and can be used for best-effort cancellation.
///
/// The type of the result returned by the asynchronous function.
/// Asynchronous function to convert.
/// An observable sequence exposing the result of invoking the function, or an exception.
/// is null.
/// When a subscription to the resulting sequence is disposed, the CancellationToken that was fed to the asynchronous function will be signaled.
public static IObservable FromAsync(Func> functionAsync)
{
return s_impl.FromAsync(functionAsync);
}
#endregion
#region Action
///
/// Converts to asynchronous action into an observable sequence. Each subscription to the resulting sequence causes the action to be started.
///
/// Asynchronous action to convert.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// is null.
public static IObservable FromAsync(Func actionAsync)
{
return s_impl.FromAsync(actionAsync);
}
///
/// Converts to asynchronous action into an observable sequence. Each subscription to the resulting sequence causes the action to be started.
/// The CancellationToken passed to the asynchronous action is tied to the observable sequence's subscription that triggered the action's invocation and can be used for best-effort cancellation.
///
/// Asynchronous action to convert.
/// An observable sequence exposing a Unit value upon completion of the action, or an exception.
/// When a subscription to the resulting sequence is disposed, the CancellationToken that was fed to the asynchronous function will be signaled.
/// is null.
public static IObservable FromAsync(Func actionAsync)
{
return s_impl.FromAsync(actionAsync);
}
#endregion
#endif
#endregion
#region ToAsync
#region Func
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
#if !NO_LARGEARITY
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the seventh argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the seventh argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the seventh argument passed to the function.
/// The type of the eighth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Asynchronous function.
/// is null.
public static Func> ToAsync(this Func function)
{
if (function == null)
throw new ArgumentNullException("function");
return s_impl.ToAsync(function);
}
///
/// Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
///
/// The type of the first argument passed to the function.
/// The type of the second argument passed to the function.
/// The type of the third argument passed to the function.
/// The type of the fourth argument passed to the function.
/// The type of the fifth argument passed to the function.
/// The type of the sixth argument passed to the function.
/// The type of the seventh argument passed to the function.
/// The type of the eighth argument passed to the function.
/// The type of the result returned by the function.
/// Function to convert to an asynchronous function.
/// Scheduler to invoke the original function on.
/// Asynchronous function.
/// or is null.
public static Func> ToAsync(this Func function, IScheduler scheduler)
{
if (function == null)
throw new ArgumentNullException("function");
if (scheduler == null)
throw new ArgumentNullException("scheduler");
return s_impl.ToAsync(function, scheduler);
}
///