CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
retry_condition_header_value.h
1
2#pragma once
3
4#include "system/date_time_offset.h"
5#include <cstdint>
6#include <system/icloneable.h>
7#include <system/nullable.h>
8#include <system/object.h>
9#include <system/shared_ptr.h>
10#include <system/string.h>
11#include <system/timespan.h>
12
13namespace System { namespace Net { namespace Http { namespace Headers {
14
19class ASPOSECPP_SHARED_CLASS RetryConditionHeaderValue : public System::ICloneable
20{
25
27 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
29 ASPOSECPP_SHARED_RTTI_INFO_DECL();
30
31public:
34 ASPOSECPP_SHARED_API Nullable<DateTimeOffset> get_Date();
37 ASPOSECPP_SHARED_API Nullable<TimeSpan> get_Delta();
38
41 ASPOSECPP_SHARED_API RetryConditionHeaderValue(DateTimeOffset date);
44 ASPOSECPP_SHARED_API RetryConditionHeaderValue(TimeSpan delta);
45
47 ASPOSECPP_SHARED_API String ToString() const override;
49 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> obj) override;
51 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
55 ASPOSECPP_SHARED_API static System::SharedPtr<RetryConditionHeaderValue> Parse(String input);
60 ASPOSECPP_SHARED_API static bool TryParse(String input, System::SharedPtr<RetryConditionHeaderValue>& parsedValue);
66 ASPOSECPP_SHARED_API static int32_t GetRetryConditionLength(String input, int32_t startIndex, System::SharedPtr<Object>& parsedValue);
67
68private:
72 Nullable<TimeSpan> _delta;
73
77 MEMBER_FUNCTION_MAKE_OBJECT(RetryConditionHeaderValue, CODEPORTING_ARGS(System::SharedPtr<RetryConditionHeaderValue> source), CODEPORTING_ARGS(source));
78
81 MEMBER_FUNCTION_MAKE_OBJECT(RetryConditionHeaderValue, CODEPORTING_ARGS(), CODEPORTING_ARGS());
82
84 System::SharedPtr<Object> Clone() override;
85};
86
87}}}} // namespace System::Net::Http::Headers
Contains the date and time of day relative to Coordinated Universal Time. Objects of this class shoul...
Definition: date_time_offset.h:16
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 'Retry-After' header. Objects of this class should only be allocated using ...
Definition: retry_condition_header_value.h:20
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
Nullable< TimeSpan > get_Delta()
Returns the delta value.
Nullable< DateTimeOffset > get_Date()
Returns a date value.
bool Equals(System::SharedPtr< Object > obj) override
Compares objects using C# Object.Equals semantics.
static bool TryParse(String input, System::SharedPtr< RetryConditionHeaderValue > &parsedValue)
Tries to convert a passed string to an instance of the RetryConditionHeaderValue class.
RetryConditionHeaderValue(DateTimeOffset date)
Constructs a new instance.
static System::SharedPtr< RetryConditionHeaderValue > Parse(String input)
Converts a passed string to an instance of the RetryConditionHeaderValue class.
static int32_t GetRetryConditionLength(String input, int32_t startIndex, System::SharedPtr< Object > &parsedValue)
Converts a passed string from the specified index to an instance of the RetryConditionHeaderValue cla...
RetryConditionHeaderValue(TimeSpan delta)
Constructs a new instance.
Forward declaration.
Definition: nullable.h:74
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
Represents a time interval. This type should be allocated on stack and passed to functions by value o...
Definition: timespan.h:59
Definition: db_command.h:9