This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-locking-cil/MfGames.Locking/TryGetHandler.cs

21 lines
858 B
C#

// <copyright file="TryGetHandler.cs" company="Moonfire Games">
// Copyright (c) Moonfire Games.
// This code is licensed under the MIT license.
// See LICENSE.md in the source or https://opensource.org/licenses/MIT
// </copyright>
namespace MfGames.Locking
{
/// <summary>
/// Defines the common try/get handler to retrieve an item of a given type.
/// </summary>
/// <typeparam name="TInput">The type of the input or lookup key.</typeparam>
/// <typeparam name="TOutput">The type of the output.</typeparam>
/// <param name="input">The input value to search for.</param>
/// <param name="output">The resulting output value.</param>
/// <returns>True if the attempt was successful, otherwise false.</returns>
public delegate bool TryGetHandler<in TInput, TOutput>(
TInput input,
out TOutput output);
}