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;
2using System.Collections.Generic;
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<object> GetAsync(Uri Uri, X509Certificate Certificate,
41 RemoteCertificateEventHandler RemoteCertificateValidator,
42 params KeyValuePair<string, string>[] Headers);
43
53 Task<object> GetAsync(Uri Uri, X509Certificate Certificate,
54 RemoteCertificateEventHandler RemoteCertificateValidator,
55 int TimeoutMs, params KeyValuePair<string, string>[] Headers);
56
65 Task<KeyValuePair<string, TemporaryStream>> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
66 RemoteCertificateEventHandler RemoteCertificateValidator, params KeyValuePair<string, string>[] Headers);
67
77 Task<KeyValuePair<string, TemporaryStream>> GetTempStreamAsync(Uri Uri, X509Certificate Certificate,
78 RemoteCertificateEventHandler RemoteCertificateValidator, int TimeoutMs, params KeyValuePair<string, string>[] Headers);
79 }
80}
Basic interface for Internet Content getters. A class implementing this interface and having a defaul...
Task< KeyValuePair< string, TemporaryStream > > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, RemoteCertificateEventHandler RemoteCertificateValidator, int TimeoutMs, 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< object > GetAsync(Uri Uri, X509Certificate Certificate, RemoteCertificateEventHandler RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
Gets a resource, using a Uniform Resource Identifier (or Locator).
Task< object > GetAsync(Uri Uri, X509Certificate Certificate, RemoteCertificateEventHandler RemoteCertificateValidator, int TimeoutMs, params KeyValuePair< string, string >[] Headers)
Gets a resource, using a Uniform Resource Identifier (or Locator).
string[] UriSchemes
Supported URI schemes.
Task< KeyValuePair< string, TemporaryStream > > GetTempStreamAsync(Uri Uri, X509Certificate Certificate, RemoteCertificateEventHandler RemoteCertificateValidator, params KeyValuePair< string, string >[] Headers)
Gets a (possibly big) resource, using a Uniform Resource Identifier (or Locator).
delegate void RemoteCertificateEventHandler(object Sender, RemoteCertificateEventArgs e)
Delegate for remote certificate event handlers.
Grade
Grade enumeration
Definition: Grade.cs:7