winget-cli

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

ConfigurationSetParserError.h (1068B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "ConfigurationSetParser.h"
      5 #include <string_view>
      6 
      7 namespace winrt::Microsoft::Management::Configuration::implementation
      8 {
      9     // Parser object that only indicates an error occurred.
     10     struct ConfigurationSetParserError : public ConfigurationSetParser
     11     {
     12         ConfigurationSetParserError(hresult result, std::string_view field = {}, std::string_view value = {})
     13         {
     14             SetError(result, field, value);
     15         }
     16 
     17         ConfigurationSetParserError(hresult result, std::string_view field, const AppInstaller::YAML::Mark& mark)
     18         {
     19             SetError(result, field, mark);
     20         }
     21 
     22         void Parse() override {}
     23 
     24         hstring GetSchemaVersion() override { return {}; }
     25 
     26         void ExtractEnvironmentFromMetadata(Windows::Foundation::Collections::ValueSet, implementation::ConfigurationEnvironment&) override {}
     27 
     28     protected:
     29         void SetDocument(AppInstaller::YAML::Node&&) override {}
     30     };
     31 }