CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
product_info_header_value.h
1
2#pragma once
3
4#include <system/icloneable.h>
5#include <system/object.h>
6#include <system/shared_ptr.h>
7
8#include <net/http/headers/product_header_value.h>
9
10namespace System { namespace Net { namespace Http { namespace Headers {
11
16class ASPOSECPP_SHARED_CLASS ProductInfoHeaderValue : public System::ICloneable
17{
22
24 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
26 ASPOSECPP_SHARED_RTTI_INFO_DECL();
27
28public:
34 ASPOSECPP_SHARED_API String get_Comment();
35
39 ASPOSECPP_SHARED_API ProductInfoHeaderValue(String productName, String productVersion);
45 ASPOSECPP_SHARED_API ProductInfoHeaderValue(String comment);
46
48 ASPOSECPP_SHARED_API String ToString() const override;
50 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> obj) override;
52 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
56 ASPOSECPP_SHARED_API static System::SharedPtr<ProductInfoHeaderValue> Parse(String input);
61 ASPOSECPP_SHARED_API static bool TryParse(String input, System::SharedPtr<ProductInfoHeaderValue>& parsedValue);
67 ASPOSECPP_SHARED_API static int32_t GetProductInfoLength(String input, int32_t startIndex,
69
70private:
73 // The comment.
74 String _comment;
75
79 MEMBER_FUNCTION_MAKE_OBJECT(ProductInfoHeaderValue, CODEPORTING_ARGS(System::SharedPtr<ProductInfoHeaderValue> source), CODEPORTING_ARGS(source));
80
83 MEMBER_FUNCTION_MAKE_OBJECT(ProductInfoHeaderValue, CODEPORTING_ARGS(), CODEPORTING_ARGS());
84
86 System::SharedPtr<Object> Clone() override;
87};
88
89}}}} // 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 a product or a comment in a value of the 'User-Agent' header. Objects of this class should...
Definition: product_info_header_value.h:17
System::SharedPtr< ProductHeaderValue > get_Product()
Returns a product.
ProductInfoHeaderValue(System::SharedPtr< ProductHeaderValue > product)
Constructs a new instance.
static bool TryParse(String input, System::SharedPtr< ProductInfoHeaderValue > &parsedValue)
Tries to convert a passed string to an instance of the ProductInfoHeaderValue class.
bool Equals(System::SharedPtr< Object > obj) override
Compares objects using C# Object.Equals semantics.
static System::SharedPtr< ProductInfoHeaderValue > Parse(String input)
Converts a passed string to an instance of the ProductInfoHeaderValue class.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
ProductInfoHeaderValue(String productName, String productVersion)
Constructs a new instance.
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
ProductInfoHeaderValue(String comment)
Constructs a new instance.
static int32_t GetProductInfoLength(String input, int32_t startIndex, System::SharedPtr< ProductInfoHeaderValue > &parsedValue)
Converts a passed string from the specified index to an instance of the ProductInfoHeaderValue class.
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