public XenMasterEventArgs(string message, MasterEventType type, Serverity severity) { Message = message; Type = type; Severity = severity; CanonicalType = _Type.ToString().Replace("_", " "); }
private void Log(Serverity serverity, string message, Exception exception = null) { if (logger == null) { return; } try { logger.Invoke(serverity, message, exception); } catch { } }
/// <summary> /// Sets the specified hresult. /// </summary> /// <param name="hresult">The hresult.</param> public void Set(int hresult) { _hresult = (uint)hresult; _serverityCode = (int)(_hresult >> 30); _serverity = (Serverity)_serverityCode; _facilityCode = (int)(_hresult >> 16); _facilityCode = _facilityCode & 0x0FFF; if (Enum.IsDefined(typeof(Facility), _facilityCode)) { _facility = (Facility)_facilityCode; } else { _facility = Facility.Unknown; } _code = (int)_hresult & 0x0000FFFF; }
public override int GetHashCode() { int hashCode = StartLine ^ EndLine; if (Serverity != null) { hashCode ^= Serverity.GetHashCode(); } if (Message != null) { hashCode ^= Message.GetHashCode(); } if (FilePath != null) { hashCode ^= FilePath.GetHashCode(); } if (Span != null) { hashCode ^= Span.GetHashCode(); } return(hashCode); }
/// <summary> /// Sets the specified hresult. /// </summary> /// <param name="hresult">The hresult.</param> public void Set(int hresult) { _hresult = (uint)hresult; _serverityCode = (int)(_hresult >> 30); _serverity = (Serverity)_serverityCode; _facilityCode = (int)(_hresult >> 16); _facilityCode = _facilityCode & 0x0FFF; if (Enum.IsDefined(typeof (Facility), _facilityCode)) _facility = (Facility)_facilityCode; else _facility = Facility.Unknown; _code = (int)_hresult & 0x0000FFFF; }
public CompileMessage(Serverity serverity, string message, string datails) { MServerity = serverity; RawMessage = message; Detail = datails; }
public CompileMessage(Serverity serverity, string message) { MServerity = serverity; RawMessage = message; Detail = ""; }