Пример #1
0
 /// <summary>
 /// Gets unary operator.
 /// </summary>
 /// <param name="op">Unary operator type.</param>
 /// <param name="lookup">Operator resolution strategy.</param>
 /// <typeparam name="TResult">Result of unary operator.</typeparam>
 /// <returns>Unary operator; or <see langword="null"/>, if it doesn't exist.</returns>
 public static UnaryOperator <T, TResult>?Get <TResult>(UnaryOperator op, OperatorLookup lookup = OperatorLookup.Any) => UnaryOperator <T, TResult> .GetOrCreate(op, lookup);
Пример #2
0
 /// <summary>
 /// Gets unary operator.
 /// </summary>
 /// <param name="op">Unary operator type.</param>
 /// <param name="lookup">Operator resolution strategy.</param>
 /// <typeparam name="R">Result of unary operator.</typeparam>
 /// <returns>Unary operator; or <see langword="null"/>, if it doesn't exist.</returns>
 public static UnaryOperator <T, R>?Get <R>(UnaryOperator op, OperatorLookup lookup = OperatorLookup.Any) => UnaryOperator <T, R> .GetOrCreate(op, lookup);