-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathIInternetContent.cs
More file actions
40 lines (37 loc) · 1.06 KB
/
IInternetContent.cs
File metadata and controls
40 lines (37 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
namespace Waher.Content
{
/// <summary>
/// Base interface for Internet content encoders or decoders.
/// </summary>
public interface IInternetContent
{
/// <summary>
/// Supported content types.
/// </summary>
string[] ContentTypes
{
get;
}
/// <summary>
/// Supported file extensions.
/// </summary>
string[] FileExtensions
{
get;
}
/// <summary>
/// Tries to get the content type of an item, given its file extension.
/// </summary>
/// <param name="FileExtension">File extension.</param>
/// <param name="ContentType">Content type.</param>
/// <returns>If the extension was recognized.</returns>
bool TryGetContentType(string FileExtension, out string ContentType);
/// <summary>
/// Tries to get the file extension of an item, given its Content-Type.
/// </summary>
/// <param name="ContentType">Content type.</param>
/// <param name="FileExtension">File extension.</param>
/// <returns>If the Content-Type was recognized.</returns>
bool TryGetFileExtension(string ContentType, out string FileExtension);
}
}