コード例 #1
0
 // https://docs.microsoft.com/en-us/dotnet/csharp/deconstruct#deconstructing-user-defined-types
 public void Deconstruct(out K key, out ProfilerEntry entity)
 {
     key    = Key;
     entity = Entity;
 }
コード例 #2
0
 /// <summary>
 /// Gets the entity tagged by the key.
 /// </summary>
 /// <param name="key">Key to search an entity with.</param>
 /// <param name="entity">Entity if found.</param>
 /// <returns>True if found, otherwise false.</returns>
 public bool TryGet(K key, out ProfilerEntry entity)
 {
     return(_entities.TryGetValue(key, out entity));
 }
コード例 #3
0
 public KeyedEntity(K key, ProfilerEntry entity)
 {
     Key    = key;
     Entity = entity;
 }