示例#1
0
 /// <summary> Gets. </summary>
 /// <typeparam name="T1"> Generic type parameter. </typeparam>
 /// <param name="key"> The key. </param>
 /// <param name="r">   [out] The out R&lt;T1&gt; 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));
     }
 }
示例#2
0
 /// <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());
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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);
 }