CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
authentication_header_value.h
1
2#pragma once
3
4#include <cstdint>
5#include <system/icloneable.h>
6#include <system/object.h>
7#include <system/shared_ptr.h>
8#include <system/string.h>
9
10namespace System { namespace Net { namespace Http { namespace Headers {
11
16class ASPOSECPP_SHARED_CLASS AuthenticationHeaderValue : public System::ICloneable
17{
22
24 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
26 ASPOSECPP_SHARED_RTTI_INFO_DECL();
27
28public:
31 ASPOSECPP_SHARED_API String get_Scheme();
34 ASPOSECPP_SHARED_API String get_Parameter();
35
38 ASPOSECPP_SHARED_API AuthenticationHeaderValue(String scheme);
42 ASPOSECPP_SHARED_API AuthenticationHeaderValue(String scheme, String parameter);
43
45 ASPOSECPP_SHARED_API virtual String ToString() const override;
47 ASPOSECPP_SHARED_API virtual bool Equals(System::SharedPtr<Object> obj) override;
49 ASPOSECPP_SHARED_API virtual int32_t GetHashCode() const override;
53 ASPOSECPP_SHARED_API static System::SharedPtr<AuthenticationHeaderValue> Parse(String input);
58 ASPOSECPP_SHARED_API static bool TryParse(String input, System::SharedPtr<AuthenticationHeaderValue>& parsedValue);
64 ASPOSECPP_SHARED_API static int32_t GetAuthenticationLength(String input, int32_t startIndex, System::SharedPtr<Object>& parsedValue);
67
68private:
70 String _scheme;
72 String _parameter;
73
77 MEMBER_FUNCTION_MAKE_OBJECT(AuthenticationHeaderValue, CODEPORTING_ARGS(System::SharedPtr<AuthenticationHeaderValue> source), CODEPORTING_ARGS(source));
78
81 MEMBER_FUNCTION_MAKE_OBJECT(AuthenticationHeaderValue, CODEPORTING_ARGS(), CODEPORTING_ARGS());
82
88 static bool TrySkipFirstBlob(String input, int32_t& current, int32_t& parameterEndIndex);
94 static bool TryGetParametersEndIndex(String input, int32_t& parseEndIndex, int32_t& parameterEndIndex);
95};
96
97}}}} // namespace System::Net::Http::Headers
Defies a method that enables object cloning - creating a copy of an object. Objects of this class sho...
Definition: icloneable.h:16
Represents values of the 'Authorization', 'ProxyAuthorization', 'WWW-Authenticate',...
Definition: authentication_header_value.h:17
static int32_t GetAuthenticationLength(String input, int32_t startIndex, System::SharedPtr< Object > &parsedValue)
Parses the specified string and returns the last index of the string representation.
virtual bool Equals(System::SharedPtr< Object > obj) override
Compares objects using C# Object.Equals semantics.
static System::SharedPtr< AuthenticationHeaderValue > Parse(String input)
Converts a passed string to an instance of the AuthenticationHeaderValue class.
virtual int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
System::SharedPtr< Object > Clone() override
Creates a copy of the current object and returns a shared pointer to it.
AuthenticationHeaderValue(String scheme, String parameter)
Constructor.
String get_Scheme()
Gets the scheme that can be used for authorization.
virtual String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
static bool TryParse(String input, System::SharedPtr< AuthenticationHeaderValue > &parsedValue)
Trying to convert a passed string to an instance of the AuthenticationHeaderValue class.
String get_Parameter()
Gets the credentials containing the authentication information.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9