/// <summary> Gets. </summary> /// <typeparam name="T1"> Generic type parameter. </typeparam> /// <param name="key"> The key. </param> /// <param name="r"> [out] The out R<T1> to process. </param> /// <exception cref="KeyNotFoundException"> Thrown when a Key Not Found error condition occurs. </exception> public void Get <T1>(string key, out RR <T1> r) { if (!RrHandler <T1> .Get(key, out r)) { throw new KeyNotFoundException(nameof(key)); } }
/// <summary> Gets. </summary> /// <typeparam name="T1"> Generic type parameter. </typeparam> /// <param name="key"> The key. </param> /// <returns> A ref T1. </returns> /// <exception cref="KeyNotFoundException"> Thrown when a Key Not Found error condition occurs. </exception> public ref T1 GetR <T1>(string key) { if (!RrHandler <T1> .Get(key, out RR <T1> r)) { throw new KeyNotFoundException(nameof(key)); } return(ref r.Invoke()); }
/// <summary> Deregisters this object. </summary> /// <typeparam name="T1"> Generic type parameter. </typeparam> /// <param name="key"> The key. </param> /// <param name="callback"> The callback. </param> public void Unregister <T1>(string key, RR <T1> callback) { RrHandler <T1> .Unregister(key); }
/// <summary> Registers this object. </summary> /// <typeparam name="T1"> Generic type parameter. </typeparam> /// <param name="key"> The key. </param> /// <param name="callback"> The callback. </param> public void Register <T1>(string key, RR <T1> callback) { RrHandler <T1> .Register(key, callback); }