CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
range_header_value.h
1
2#pragma once
3
4#include <system/collections/icollection.h>
5#include <system/icloneable.h>
6#include <system/nullable.h>
7#include <system/object.h>
8#include <system/shared_ptr.h>
9#include <system/string.h>
10
11#include <net/http/headers/object_collection.h>
12#include <net/http/headers/range_item_header_value.h>
13
14namespace System { namespace Net { namespace Http { namespace Headers {
15
20class ASPOSECPP_SHARED_CLASS RangeHeaderValue : public System::ICloneable
21{
26
28 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
30 ASPOSECPP_SHARED_RTTI_INFO_DECL();
31
32public:
35 ASPOSECPP_SHARED_API String get_Unit();
38 ASPOSECPP_SHARED_API void set_Unit(String value);
43
45 ASPOSECPP_SHARED_API RangeHeaderValue();
50
52 ASPOSECPP_SHARED_API String ToString() const override;
54 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> obj) override;
56 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
60 ASPOSECPP_SHARED_API static System::SharedPtr<RangeHeaderValue> Parse(String input);
65 ASPOSECPP_SHARED_API static bool TryParse(String input, System::SharedPtr<RangeHeaderValue>& parsedValue);
71 ASPOSECPP_SHARED_API static int32_t GetRangeLength(String input, int32_t startIndex, System::SharedPtr<Object>& parsedValue);
72
73private:
75 String _unit;
78
82 MEMBER_FUNCTION_MAKE_OBJECT(RangeHeaderValue, CODEPORTING_ARGS(System::SharedPtr<RangeHeaderValue> source), CODEPORTING_ARGS(source));
83
85 System::SharedPtr<Object> Clone() override;
86};
87
88}}}} // 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 value of the 'Range' header. Objects of this class should only be allocated using System...
Definition: range_header_value.h:21
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
void set_Unit(String value)
Sets a unit.
System::SharedPtr< Collections::Generic::ICollection< System::SharedPtr< RangeItemHeaderValue > > > get_Ranges()
Returns the collection of the ranges.
RangeHeaderValue()
Constructs a new instance.
bool Equals(System::SharedPtr< Object > obj) override
Compares objects using C# Object.Equals semantics.
static System::SharedPtr< RangeHeaderValue > Parse(String input)
Converts a passed string to an instance of the RangeHeaderValue class.
RangeHeaderValue(Nullable< int64_t > from, Nullable< int64_t > to)
Constructs a new instance.
static int32_t GetRangeLength(String input, int32_t startIndex, System::SharedPtr< Object > &parsedValue)
Converts a passed string from the specified index to an instance of the RangeHeaderValue class.
static bool TryParse(String input, System::SharedPtr< RangeHeaderValue > &parsedValue)
Tries to convert a passed string to an instance of the RangeHeaderValue class.
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
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