/// <summary>
        /// Create a chain operation to handle dependencies.
        /// </summary>
        /// <typeparam name="TObject">The type of operation handle to return.</typeparam>
        /// <param name="dependentOp">The dependency operation.</param>
        /// <param name="callback">The callback method that will create the dependent operation from the dependency operation.</param>
        /// <param name="releaseDependenciesOnFailure"> Whether to release dependencies if the created operation has failed.</param>
        /// <returns>The operation handle.</returns>
        public AsyncOperationHandle <TObject> CreateChainOperation <TObject>(AsyncOperationHandle dependentOp, Func <AsyncOperationHandle, AsyncOperationHandle <TObject> > callback, bool releaseDependenciesOnFailure = true)
        {
            var cOp = new ChainOperationTypelessDepedency <TObject>();

            cOp.Init(dependentOp, callback, releaseDependenciesOnFailure);
            return(StartOperation(cOp, dependentOp));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a chain operation to handle dependencies.
        /// </summary>
        /// <typeparam name="TObject">The type of operation handle to return.</typeparam>
        /// <param name="dependentOp">The dependency operation.</param>
        /// <param name="callback">The callback method that will create the dependent operation from the dependency operation.</param>
        /// <returns>The operation handle.</returns>
        public AsyncOperationHandle <TObject> CreateChainOperation <TObject>(AsyncOperationHandle dependentOp, Func <AsyncOperationHandle, AsyncOperationHandle <TObject> > callback)
        {
            var cOp = new ChainOperationTypelessDepedency <TObject>();

            cOp.Init(dependentOp, callback);
            return(StartOperation(cOp, dependentOp));
        }