Files
microsoft-krabsetw/O365.Security.Native.ETW/EventRecordError.hpp
T
Zac Brown (ODSP SECURITY) d741c16cc8 Initial public release.
2016-10-26 15:08:31 -07:00

53 lines
1.4 KiB
C++

// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#pragma once
#include "IEventRecordMetadata.hpp"
namespace O365 { namespace Security { namespace ETW {
/// <summary>
/// Item passed to OnError handlers when an error is encountered
/// handling an event on the worker thread.
/// </summary>
public ref struct EventRecordError
{
private:
initonly System::String^ msg_;
initonly IEventRecordMetadata^ record_;
// TODO: additional info like provider, event id?
public:
/// <summary>
/// Returns a string representing a message about the
/// error that was encountered in the EventRecord.
/// </summary>
property System::String^ Message {
System::String^ get() {
return msg_;
}
}
/// <summary>
/// Returns an object representing metadata about the
/// record that was being processed when the error was
/// encountered.
/// </summary>
property IEventRecordMetadata^ Record {
IEventRecordMetadata^ get() {
return record_;
}
}
internal:
EventRecordError(
System::String^ message,
IEventRecordMetadata^ record)
: msg_(message)
, record_(record)
{ }
};
} } }