//---------------------------------------------------------------------------------------------------------------------- /// \file /// Class used for opening/closing log contexts. // Copyright (c) Microsoft Corporation. All Rights Reserved. //---------------------------------------------------------------------------------------------------------------------- #pragma once #if defined(_WIN32) #include "Wex.Logger.h" #include "Log.h" namespace WEX { namespace Logging { /// /// /// class WEXLOGGER_API LogContext final { public: /// /// Create a new context /// /// /// /// static void __stdcall CreateContext(const wchar_t* pszParentContext, const wchar_t* pszChildContext, const wchar_t* pszChildData); /// /// Close the specified context, and assign it the specified test result /// /// /// static void __stdcall CloseContext(const wchar_t* pszContext, TestResults::Result testResult); /// /// Log a comment in plain text for the specified context /// /// /// static void __stdcall LogComment(const wchar_t* pszContext, const wchar_t* pszComment); /// /// Log a test file to be saved for the specified context /// /// /// static void __stdcall LogFile(const wchar_t* pszContext, const wchar_t* pszFileName); /// /// Log xml data for the specified context; no check is made to verify that it is well-formed /// /// /// static void __stdcall LogXml(const wchar_t* pszContext, const wchar_t* pszXml); // wchar_t native type exports #if defined(WEXLOGGER_EXPORTS) static void __stdcall CreateContext(const unsigned short* pszParentContext, const unsigned short* pszChildContext, const unsigned short* pszChildData); static void __stdcall CloseContext(const unsigned short* pszContext, TestResults::Result testResult); static void __stdcall LogComment(const unsigned short* pszContext, const unsigned short* pszComment); static void __stdcall LogFile(const unsigned short* pszContext, const unsigned short* pszFileName); static void __stdcall LogXml(const unsigned short* pszContext, const unsigned short* pszXml); #endif private: // Disallow construction of static class LogContext() = delete; ~LogContext() = delete; LogContext(const LogContext&) = delete; LogContext& operator=(const LogContext&) = delete; }; }/* namespace Logging */}/* namespace WEX */ #endif // #if defined(_WIN32)