コード例 #1
0
ファイル: LogEventIds.cs プロジェクト: mspnp/gridwich
 /// <summary>Generate the lowest possible (index==0) event id for the subsystem/level pair of evt.</summary>
 /// <param name="evt">Event.</param>
 /// <returns>id.</returns>
 public static int GetMinEventIdForRange(this EventId evt)
 {
     return(GenerateId(evt.GetLevel(), evt.GetSubsystem(), 0));
 }
コード例 #2
0
ファイル: LogEventIds.cs プロジェクト: mspnp/gridwich
 /// <summary>
 /// Gets the level as a string for the given <c>EventId</c>.
 /// </summary>
 /// <param name="evt">The eventId</param>
 /// <returns>A string mapping to the enumeration value for <see cref="LogEventIds.LogEventIdLevel"/></returns>
 public static string GetLevelName(this EventId evt)
 {
     return(evt.GetLevel().ToString());
 }
コード例 #3
0
ファイル: LogEventIds.cs プロジェクト: mspnp/gridwich
 /// <summary>Generate the highest possible event id for the subsystem/level pair of evt.</summary>
 /// <param name="evt">Event.</param>
 /// <returns>id.</returns>
 public static int GetMaxEventIdForRange(this EventId evt)
 {
     return(GenerateId(evt.GetLevel(), evt.GetSubsystem(), LogEventIdsIdEncoding.MaxIndex));
 }