Ejemplo n.º 1
0
 /// <summary>Retrieves the Guid associated with a <see cref="KNOWNFOLDERID"/>.</summary>
 /// <param name="id">The known folder.</param>
 /// <returns>The GUID associated with the <paramref name="id"/> or <see cref="Guid.Empty"/> if no association exists.</returns>
 public static Guid Guid(this KNOWNFOLDERID id) => AssociateAttribute.GetGuidFromEnum(id);
Ejemplo n.º 2
0
 /// <summary>Retrieves the Guid associated with a <see cref="FOLDERTYPEID"/>.</summary>
 /// <param name="id">The known folder.</param>
 /// <returns>The GUID.</returns>
 public static Guid Guid(this FOLDERTYPEID id) => AssociateAttribute.GetGuidFromEnum(id);
Ejemplo n.º 3
0
 /// <summary>Lookups the specified unique identifier.</summary>
 /// <param name="guid">The unique identifier.</param>
 /// <returns>Corresponding BHID.</returns>
 public static TEnum Lookup <TEnum>(Guid guid) => AssociateAttribute.TryEnumLookup(guid, out TEnum val) ? val : (TEnum)Convert.ChangeType(-1, typeof(TEnum));
Ejemplo n.º 4
0
 /// <summary>Retrieves the Guid associated with a <see cref="BHID"/>.</summary>
 /// <param name="id">The known folder.</param>
 /// <returns>The GUID.</returns>
 public static Guid Guid(this BHID id) => AssociateAttribute.GetGuidFromEnum(id);