Exemplo n.º 1
0
        public static void TestUseCase()
        {
            var blob1 = new Blob(new BlobDataObject[] { "blobData1" }, new BlobPropertyBag { Type = "text/richtext", Endings = Endings.Transparent });

            Assert.AreNotEqual(blob1, null, "blob1 is not null");
            Assert.AreEqual(blob1.Size, 9, "blob1.Size equals 9");
            Assert.AreEqual(blob1.Type, "text/richtext", "blob1.Type equals 'text/richtext'");

            var blob2 = new Blob(new BlobDataObject[] { "data2" });
            Assert.AreNotEqual(blob2, null, "blob2 is not null");
            Assert.AreEqual(blob2.Size, 5, "blob2.Size equals 5");

        }
Exemplo n.º 2
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual void Send(Blob data)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Appends a key/value pair to the FormData object.
 /// </summary>
 /// <param name="name">The name of the field whose data is contained in value.</param>
 /// <param name="value">The field's value. Can be a Blob, File, or a string, if neither, the value is converted to a string.</param>
 /// <param name="filename">The filename reported to the server, when a Blob or File is passed as second paramter. The default filename for Blob objects is "blob".</param>
 public virtual void Append(string name, Blob value, string filename)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual extern void Send(Blob data);
Exemplo n.º 5
0
 public extern void ReadAsDataURL(Blob blob);
Exemplo n.º 6
0
 public extern void ReadAsText(Blob blob, string label = default(string));
Exemplo n.º 7
0
 public extern void ReadAsArrayBuffer(Blob blob);
Exemplo n.º 8
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual extern void Send(Blob data);