CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
content_disposition_header_value.h
1
2#pragma once
3
4#include "system/date_time_offset.h"
5#include <cstdint>
6#include <system/collections/icollection.h>
7#include <system/date_time_offset.h>
8#include <system/icloneable.h>
9#include <system/nullable.h>
10#include <system/object.h>
11#include <system/shared_ptr.h>
12#include <system/string.h>
13
14#include <net/http/headers/name_value_header_value.h>
15#include <net/http/headers/object_collection.h>
16
17namespace System { namespace Net { namespace Http { namespace Headers {
18
23class ASPOSECPP_SHARED_CLASS ContentDispositionHeaderValue : public System::ICloneable
24{
29
31 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
33 ASPOSECPP_SHARED_RTTI_INFO_DECL();
34
35public:
38 ASPOSECPP_SHARED_API String get_DispositionType();
41 ASPOSECPP_SHARED_API void set_DispositionType(String value);
47 ASPOSECPP_SHARED_API String get_Name();
50 ASPOSECPP_SHARED_API void set_Name(String value);
54 ASPOSECPP_SHARED_API String get_FileName();
58 ASPOSECPP_SHARED_API void set_FileName(String value);
62 ASPOSECPP_SHARED_API String get_FileNameStar();
66 ASPOSECPP_SHARED_API void set_FileNameStar(String value);
72 ASPOSECPP_SHARED_API void set_CreationDate(Nullable<DateTimeOffset> value);
78 ASPOSECPP_SHARED_API void set_ModificationDate(Nullable<DateTimeOffset> value);
81 ASPOSECPP_SHARED_API Nullable<DateTimeOffset> get_ReadDate();
84 ASPOSECPP_SHARED_API void set_ReadDate(Nullable<DateTimeOffset> value);
87 ASPOSECPP_SHARED_API Nullable<int64_t> get_Size();
90 ASPOSECPP_SHARED_API void set_Size(Nullable<int64_t> value);
91
93 ASPOSECPP_SHARED_API ContentDispositionHeaderValue();
96 ASPOSECPP_SHARED_API ContentDispositionHeaderValue(String dispositionType);
97
99 ASPOSECPP_SHARED_API String ToString() const override;
101 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> obj) override;
103 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
112 ASPOSECPP_SHARED_API static bool TryParse(String input, System::SharedPtr<ContentDispositionHeaderValue>& parsedValue);
118 ASPOSECPP_SHARED_API static int32_t GetDispositionTypeLength(String input, int32_t startIndex, System::SharedPtr<Object>& parsedValue);
119
120protected:
124 MEMBER_FUNCTION_MAKE_OBJECT(ContentDispositionHeaderValue, CODEPORTING_ARGS(System::SharedPtr<ContentDispositionHeaderValue> source), CODEPORTING_ARGS(source));
125
126private:
129 static const String fileName;
131 static const String name;
134 static const String fileNameStar;
136 static const String creationDate;
138 static const String modificationDate;
140 static const String readDate;
142 static const String size;
146 String _dispositionType;
147
149 System::SharedPtr<Object> Clone() override;
155 static int32_t GetDispositionTypeExpressionLength(String input, int32_t startIndex, String& dispositionType);
161 static void CheckDispositionTypeFormat(String dispositionType, String parameterName);
165 Nullable<DateTimeOffset> GetDate(String parameter);
169 void SetDate(String parameter, Nullable<DateTimeOffset> date);
173 String GetName(String parameter);
177 void SetName(String parameter, String value);
182 String EncodeAndQuoteMime(String input);
186 bool IsQuoted(String value);
190 bool RequiresEncoding(String input);
194 String EncodeMime(String input);
199 bool TryDecodeMime(String input, String& output);
203 String Encode5987(String input);
208 bool TryDecode5987(String input, String& output);
209};
210
211}}}} // 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 'Content-Disposition' header. Objects of this class should only be allocate...
Definition: content_disposition_header_value.h:24
void set_CreationDate(Nullable< DateTimeOffset > value)
Sets the file creation date.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
void set_FileNameStar(String value)
Sets a value that determines how to construct filenames for storing the message payload....
static System::SharedPtr< ContentDispositionHeaderValue > Parse(String input)
Converts a passed string to an instance of the ContentDispositionHeaderValue class.
String get_Name()
Gets a name for a part of the content body.
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
bool Equals(System::SharedPtr< Object > obj) override
Compares objects using C# Object.Equals semantics.
System::SharedPtr< Collections::Generic::ICollection< System::SharedPtr< NameValueHeaderValue > > > get_Parameters()
Returns a parameters collection of the 'Content-Disposition' header.
static bool TryParse(String input, System::SharedPtr< ContentDispositionHeaderValue > &parsedValue)
Tries to convert a passed string to an instance of the ContentDispositionHeaderValue class.
String get_DispositionType()
Gets a disposition type.
String get_FileNameStar()
Gets a value that determines how to construct filenames for storing the message payload....
void set_FileName(String value)
Sets a value that determines how to construct a filename for storing the message payload....
void set_Size(Nullable< int64_t > value)
Sets an approximate file size.
ContentDispositionHeaderValue(String dispositionType)
Constructs a new instance.
Nullable< int64_t > get_Size()
Gets an approximate file size.
static int32_t GetDispositionTypeLength(String input, int32_t startIndex, System::SharedPtr< Object > &parsedValue)
Converts a passed string from the specified index to an instance of the ContentDispositionHeaderValue...
ContentDispositionHeaderValue(System::SharedPtr< ContentDispositionHeaderValue > source)
The copy constructor.
void set_DispositionType(String value)
Sets a disposition type.
Nullable< DateTimeOffset > get_CreationDate()
Gets the file creation date.
void set_Name(String value)
Sets a name for a part of the content body.
Nullable< DateTimeOffset > get_ModificationDate()
Gets the file modification date.
void set_ReadDate(Nullable< DateTimeOffset > value)
Sets the date when the file read the last time.
String get_FileName()
Gets a value that determines how to construct a filename for storing the message payload....
Nullable< DateTimeOffset > get_ReadDate()
Gets the date when the file was read the last time.
void set_ModificationDate(Nullable< DateTimeOffset > value)
Sets the file modification date.
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
Definition: db_command.h:9