-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathIContentConverter.cs
More file actions
43 lines (39 loc) · 1.06 KB
/
IContentConverter.cs
File metadata and controls
43 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Waher.Runtime.Inventory;
using System.Threading.Tasks;
namespace Waher.Content
{
/// <summary>
/// Basic interface for Internet Content encoders. A class implementing this interface and having a default constructor, will be able
/// to partake in object encodings through the static <see cref="InternetContent"/> class. No registration is required.
/// </summary>
public interface IContentConverter
{
/// <summary>
/// Converts content from these content types.
/// </summary>
string[] FromContentTypes
{
get;
}
/// <summary>
/// Converts content to these content types. Return an array of "*" to signify content can be converted to any
/// (or at the time, an unknown) content type.
/// </summary>
string[] ToContentTypes
{
get;
}
/// <summary>
/// How well the content is converted.
/// </summary>
Grade ConversionGrade
{
get;
}
/// <summary>
/// Performs the actual conversion.
/// </summary>
/// <param name="State">State of the current conversion.</param>
Task<bool> ConvertAsync(ConversionState State);
}
}