예제 #1
0
파일: AppVar.cs 프로젝트: bangush/Friendly
        /// <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);
            }
        }
예제 #2
0
        /// <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; 
            }
        }