public static FailureLevel CreateFailureLevel(NotificationLevelVersionOne v1NotificationLevel) { switch (v1NotificationLevel) { case NotificationLevelVersionOne.Error: return(FailureLevel.Error); case NotificationLevelVersionOne.Note: return(FailureLevel.Note); default: return(FailureLevel.Warning); } }
private void Init(string id, string ruleId, string ruleKey, PhysicalLocationVersionOne physicalLocation, string message, NotificationLevelVersionOne level, int threadId, DateTime time, ExceptionDataVersionOne exception, IDictionary <string, SerializedPropertyInfo> properties) { Id = id; RuleId = ruleId; RuleKey = ruleKey; if (physicalLocation != null) { PhysicalLocation = new PhysicalLocationVersionOne(physicalLocation); } Message = message; Level = level; ThreadId = threadId; Time = time; if (exception != null) { Exception = new ExceptionDataVersionOne(exception); } if (properties != null) { Properties = new Dictionary <string, SerializedPropertyInfo>(properties); } }
/// <summary> /// Initializes a new instance of the <see cref="NotificationVersionOne" /> class from the supplied values. /// </summary> /// <param name="id"> /// An initialization value for the <see cref="P: Id" /> property. /// </param> /// <param name="ruleId"> /// An initialization value for the <see cref="P: RuleId" /> property. /// </param> /// <param name="ruleKey"> /// An initialization value for the <see cref="P: RuleKey" /> property. /// </param> /// <param name="physicalLocation"> /// An initialization value for the <see cref="P: PhysicalLocation" /> property. /// </param> /// <param name="message"> /// An initialization value for the <see cref="P: Message" /> property. /// </param> /// <param name="level"> /// An initialization value for the <see cref="P: Level" /> property. /// </param> /// <param name="threadId"> /// An initialization value for the <see cref="P: ThreadId" /> property. /// </param> /// <param name="time"> /// An initialization value for the <see cref="P: Time" /> property. /// </param> /// <param name="exception"> /// An initialization value for the <see cref="P: Exception" /> property. /// </param> /// <param name="properties"> /// An initialization value for the <see cref="P: Properties" /> property. /// </param> public NotificationVersionOne(string id, string ruleId, string ruleKey, PhysicalLocationVersionOne physicalLocation, string message, NotificationLevelVersionOne level, int threadId, DateTime time, ExceptionDataVersionOne exception, IDictionary <string, SerializedPropertyInfo> properties) { Init(id, ruleId, ruleKey, physicalLocation, message, level, threadId, time, exception, properties); }