CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
file_web_response.h
1
2#pragma once
3
4#include <system/collections/ienumerable.h>
5#include <system/io/stream.h>
6#include <system/object.h>
7#include <system/shared_ptr.h>
8#include <system/uri.h>
9
10#include <net/cookie_collection.h>
11#include <net/cookie_container.h>
12#include <net/http/http_response_message.h>
13#include <net/http_status_code.h>
14#include <net/web_header_collection.h>
15#include <net/web_response.h>
16
17namespace System { namespace Net {
18
23class ASPOSECPP_SHARED_CLASS FileWebResponse : public System::Net::WebResponse
24{
29
31 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
33 ASPOSECPP_SHARED_RTTI_INFO_DECL();
34
35public:
37 ASPOSECPP_SHARED_API int64_t get_ContentLength() override;
39 ASPOSECPP_SHARED_API String get_ContentType() override;
41 ASPOSECPP_SHARED_API System::SharedPtr<WebHeaderCollection> get_Headers() override;
43 ASPOSECPP_SHARED_API System::SharedPtr<Uri> get_ResponseUri() override;
45 ASPOSECPP_SHARED_API bool get_SupportsHeaders() override;
46
49 ASPOSECPP_SHARED_API FileWebResponse(System::SharedPtr<Uri> uri);
50
52 ASPOSECPP_SHARED_API System::SharedPtr<IO::Stream> GetResponseStream() override;
54 ASPOSECPP_SHARED_API void Close() override;
55
56protected:
58 void Dispose(bool disposing) override;
59#ifdef ASPOSE_GET_SHARED_MEMBERS
61 void GetSharedMembers(System::Object::shared_members_type& result) const override;
62#endif
63private:
65 System::SharedPtr<Uri> _requestUri;
66};
67
68}} // namespace System::Net
Provides implementation of the WebResponse abstract class to work with the file system....
Definition: file_web_response.h:24
System::SharedPtr< WebHeaderCollection > get_Headers() override
Returns the collection of the headers that are associated with the current response.
void Dispose(bool disposing) override
Does nothing.
String get_ContentType() override
Returns the MIME type of the resource.
bool get_SupportsHeaders() override
Returns a value that indicates if the current response supports headers.
FileWebResponse(System::SharedPtr< Uri > uri)
Constructs a new instance.
int64_t get_ContentLength() override
Returns the number of bytes of the resource.
System::SharedPtr< Uri > get_ResponseUri() override
Returns the resource's URI.
void Close() override
Closes the response stream.
System::SharedPtr< IO::Stream > GetResponseStream() override
Returns the response stream.
Represents a web response. Objects of this class should only be allocated using System::MakeObject() ...
Definition: web_response.h:20
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