3using System.Threading.Tasks;
93 using FileStream fs = File.OpenRead(FileName);
94 Bin = await fs.ReadAllAsync();
98 string TempFileName = Path.GetTempFileName();
99 File.Copy(FileName, TempFileName,
true);
103 using FileStream fs = File.OpenRead(TempFileName);
104 Bin = await fs.ReadAllAsync();
108 File.Delete(TempFileName);
Contains information about a response to a content request.
bool HasError
If an error occurred.
object Decoded
Decoded object.
Exception Error
Error response.
Static class managing encoding and decoding of internet content.
static string GetContentType(string FileExtension)
Gets the content type of an item, given its file extension. It uses the TryGetContentType to see if a...
static Task< ContentResponse > DecodeAsync(string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri)
Decodes an object.
Static class managing the runtime environment of the IoT Gateway.
static HttpServer HttpServer
HTTP Server
static string GetUrl(string LocalResource)
Gets a URL for a resource.
LoadResourceFile(LocalResource)
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
LoadResourceFile(ScriptNode LocalResource, int Start, int Length, Expression Expression)
LoadResourceFile(LocalResource)
override string FunctionName
Name of the function
LoadResourceFile(ScriptNode LocalResource, ScriptNode ContentType, int Start, int Length, Expression Expression)
LoadResourceFile(LocalResource, ContentType)
Script runtime exception.
Class managing a script expression.
static IElement Encapsulate(object Value)
Encapsulates an object.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes2Scalar
Two scalar parameters.
static readonly ArgumentType[] argumentTypes1Scalar
One scalar parameter.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override string ToString()
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.