1using System.Collections.Generic;
3using System.Threading.Tasks;
68 object Obj =
Argument1.AssociatedObjectValue;
72 Obj = G.CreatePixels();
79 KeyValuePair<byte[], string> P = await Encoder.EncodeAsync(Obj, System.Text.Encoding.UTF8, ContentType);
81 ContentType = P.Value;
88 ContentType = P.Value;
91 using (FileStream fs = File.Create(FileName))
93 await fs.WriteAsync(Bin, 0, Bin.Length);
Static class managing encoding and decoding of internet content.
static Task< KeyValuePair< byte[], string > > EncodeAsync(object Object, Encoding Encoding, params string[] AcceptedContentTypes)
Encodes an object.
static bool Encodes(object Object, out Grade Grade, out IContentEncoder Encoder, params string[] AcceptedContentTypes)
If a given object can be encoded.
static bool TryGetContentType(string FileExtension, out string ContentType)
Tries to get the content type of an item, given its file extension.
SaveFile(Object,FileName)
override string FunctionName
Name of the function
override IElement Evaluate(IElement Argument1, IElement Argument2, Variables Variables)
Evaluates the function.
SaveFile(ScriptNode Object, ScriptNode FileName, int Start, int Length, Expression Expression)
SaveFile(Object,FileName)
override string[] DefaultArgumentNames
Default Argument names
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(IElement Argument1, IElement Argument2, Variables Variables)
Evaluates the function.
Class managing a script expression.
Base class for funcions of one variable.
ScriptNode Argument2
Function argument 2.
ScriptNode Argument1
Function argument 1.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override string ToString()
int Start
Start position in script expression.
Basic interface for Internet Content encoders. A class implementing this interface and having a defau...
Basic interface for all types of elements.