Ejemplo n.º 1
0
 /// <inheritdoc/>
 public virtual object?GetContext(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         Func <object>?locator = null;
         if (ContextLocator?.TryGetValue(id, out locator) == true)
         {
             return(locator?.Invoke());
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
 ///<inheritdoc/>
 public virtual object?GetContext(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         Func <object>?locator = null;
         if (ContextLocator?.TryGetValue(id, out locator) == true)
         {
             return(locator?.Invoke());
         }
     }
     Debug.WriteLine($"Context with provided id={id} is not registered");
     return(null);
 }