winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

ConfigThreadGlobals.h (893B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include <winget/SharedThreadGlobals.h>
      5 #include <Telemetry/Telemetry.h>
      6 
      7 namespace winrt::Microsoft::Management::Configuration::implementation
      8 {
      9     // Interface for access to values that are stored on a per-thread object.
     10     struct ConfigThreadGlobals : public AppInstaller::ThreadLocalStorage::ThreadGlobals
     11     {
     12         ConfigThreadGlobals() = default;
     13         virtual ~ConfigThreadGlobals() = default;
     14 
     15         AppInstaller::Logging::DiagnosticLogger& GetDiagnosticLogger() override;
     16 
     17         void* GetTelemetryObject() override;
     18 
     19         TelemetryTraceLogger& GetTelemetryLogger();
     20         const TelemetryTraceLogger& GetTelemetryLogger() const;
     21 
     22     protected:
     23         AppInstaller::Logging::DiagnosticLogger m_logger;
     24         TelemetryTraceLogger m_telemetry;
     25     };
     26 }