Exemplo n.º 1
0
 /// <summary>
 /// Gets the memory trait corresponding to the specified memory domain and sub-domain.
 /// </summary>
 /// <param name="dom">A memory domain value from the <see cref="PICMemoryDomain"/> enumeration.</param>
 /// <param name="subdom">A sub-domain value from the <see cref="PICMemorySubDomain"/> enumeration.</param>
 /// <param name="trait">[out] The memory trait.</param>
 /// <returns>
 /// True if it succeeds, false if it fails.
 /// </returns>
 public bool GetTrait(PICMemoryDomain dom, PICMemorySubDomain subdom, out IPICMemTrait trait)
 {
     if (!maptraits.TryGetValue(new MemoryDomainKey(dom, subdom), out trait))
     {
         trait = memtraitdefault;
     }
     return(true);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the memory trait corresponding to the specified memory sub-domain.
 /// </summary>
 /// <param name="subdom">A sub-domain value from the <see cref="PICMemorySubDomain"/> enumeration.</param>
 /// <param name="trait">[out] The memory trait.</param>
 /// <returns>
 /// True if it succeeds, false if it fails.
 /// </returns>
 public bool GetTrait(PICMemorySubDomain subdom, out IPICMemTrait trait)
 => GetTrait(subdom.GetDomain(), subdom, out trait);