本文整理汇总了C#中Codeer.Friendly.Async.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# Async.Initialize方法的具体用法?C# Async.Initialize怎么用?C# Async.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codeer.Friendly.Async
的用法示例。
在下文中一共展示了Async.Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ArgumentNullException
/// <summary>
/// Acquires a delegate which can call operations on variables in the test target application.
/// </summary>
/// <param name="operation">Operation name.</param>
/// <param name="operationTypeInfo">
/// Operation type information.
/// Used to differentiate between multiple overloads or to target an operation with the same name within a parent class.
/// Overloads can often be resolved by their parameters without specifying an OperationTypeInfo.
/// </param>
/// <param name="async">Object for asynchronous execution. </param>
/// <returns>Delegate for executing operations.</returns>
#else
/// <summary>
/// テスト対象アプリケーション内の変数の操作を呼び出すdelegateを取得します。
/// </summary>
/// <param name="operation">操作名称。</param>
/// <param name="operationTypeInfo">操作タイプ情報。(オーバーロードの解決等に使用します。)</param>
/// <param name="async">非同期実行オブジェクト。</param>
/// <returns>操作実行delegate。</returns>
#endif
public FriendlyOperation this[string operation, OperationTypeInfo operationTypeInfo, Async async]
{
get
{
if (async == null)
{
throw new ArgumentNullException("async");
}
async.Initialize(this);
return (new AsyncFriendlyOperationOwner(async, operationTypeInfo, operation)).FriendlyOperation;
}
}