Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IContentGetter.cs
1using System;
3using System.Security.Cryptography.X509Certificates;
4using System.Threading.Tasks;
7
8namespace Waher.Content
9{
14 public interface IContentGetter
15 {
19 string[] UriSchemes
20 {
21 get;
22 }
23
30 bool CanGet(Uri Uri, out Grade Grade);
31
40 Task<ContentResponse> GetAsync(Uri Uri, X509Certificate Certificate,
41 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator,
42 params KeyValuePair<string, string>[] Headers);
43
53 Task<ContentResponse> GetAsync(Uri Uri, X509Certificate Certificate,
54 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator,
55 int TimeoutMs, params KeyValuePair<string, string>[] Headers);
56
65 Task<ContentStreamResponse> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
66 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator, params KeyValuePair<string, string>[] Headers);
67
77 Task<ContentStreamResponse> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
78 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator, TemporaryStream Destination, params KeyValuePair<string, string>[] Headers);
79
89 Task<ContentStreamResponse> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
90 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator, int TimeoutMs, params KeyValuePair<string, string>[] Headers);
91
102 Task<ContentStreamResponse> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
103 EventHandler<RemoteCertificateEventArgs> RemoteCertificateValidator, int TimeoutMs, TemporaryStream Destination,
104 params KeyValuePair<string, string>[] Headers);
105 }
106}
Manages a temporary stream. Contents is kept in-memory, if below a memory threshold,...
Basic interface for Internet Content getters. A class implementing this interface and having a defaul...
Task< ContentStreamResponse > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
Gets a (possibly big) resource, using a Uniform Resource Identifier (or Locator).
bool CanGet(Uri Uri, out Grade Grade)
If the getter is able to get a resource, given its URI.
Task< ContentStreamResponse > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, TemporaryStream Destination, params KeyValuePair< string, string >[] Headers)
Gets a (possibly big) resource, using a Uniform Resource Identifier (or Locator).
Task< ContentResponse > GetAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
Gets a resource, using a Uniform Resource Identifier (or Locator).
Task< ContentResponse > GetAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
Gets a resource, using a Uniform Resource Identifier (or Locator).
string[] UriSchemes
Supported URI schemes.
Task< ContentStreamResponse > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
Gets a (possibly big) resource, using a Uniform Resource Identifier (or Locator).
Task< ContentStreamResponse > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, EventHandler< RemoteCertificateEventArgs > RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
Gets a (possibly big) resource, using a Uniform Resource Identifier (or Locator).
Grade
Grade enumeration
Definition: Grade.cs:7