CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
byte_array_content.h
1
2#pragma once
3
4#include <cstdint>
5#include <system/array.h>
6#include <system/io/stream.h>
7#include <system/shared_ptr.h>
8#include <net/http/http_content.h>
9
10namespace System { namespace Net { namespace Http {
11
16class ASPOSECPP_SHARED_CLASS ByteArrayContent : public System::Net::Http::HttpContent
17{
22
24 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
26 ASPOSECPP_SHARED_RTTI_INFO_DECL();
27
28public:
31 ASPOSECPP_SHARED_API ByteArrayContent(System::ArrayPtr<uint8_t> content);
36 ASPOSECPP_SHARED_API ByteArrayContent(System::ArrayPtr<uint8_t> content, int32_t offset, int32_t count);
37
41 ASPOSECPP_SHARED_API bool TryComputeLength(int64_t& length) override;
42
43protected:
50
51private:
55 int32_t _offset;
57 int32_t _count;
58};
59
60}}} // namespace System::Net::Http
Represents HTTP content as a byte array. Objects of this class should only be allocated using System:...
Definition: byte_array_content.h:17
System::SharedPtr< IO::Stream > CreateContentReadStream() override
Creates a stream that is used to read content.
void SerializeToStream(System::SharedPtr< IO::Stream > stream) override
Writes content to the specified stream.
ByteArrayContent(System::ArrayPtr< uint8_t > content, int32_t offset, int32_t count)
Constructs a new instance.
bool TryComputeLength(int64_t &length) override
Tries to calculate the byte array length.
ByteArrayContent(System::ArrayPtr< uint8_t > content)
Constructs a new instance.
Represents content of an HTTP entity. Object of this class should only be allocated using System::Mak...
Definition: http_content.h:25
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9