/// <summary> /// Invoke this helper method when <see cref="Func{TResult}"/> like callbacks are /// required. /// </summary> /// <typeparam name="TTarget"></typeparam> /// <typeparam name="TResult"></typeparam> /// <param name="getTarget"></param> /// <param name="factoryCallback"></param> /// <returns></returns> private static TResult CollectionFunc <TTarget, TResult>(CollectionGetTargetCallback <TTarget> getTarget , CollectionFuncCallback <TTarget, TResult> factoryCallback) => factoryCallback(getTarget());
/// <summary> /// Invoke this helper method when <see cref="Action"/> like callbacks are required. /// </summary> /// <typeparam name="TTarget"></typeparam> /// <param name="getTarget"></param> /// <param name="targetCallback"></param> private static void CollectionAction <TTarget>(CollectionGetTargetCallback <TTarget> getTarget , CollectionActionCallback <TTarget> targetCallback) => targetCallback(getTarget());