示例#1
0
文件: N699.cs 项目: TinkerWorX/Bridge
        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");

        }
示例#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)
 {
 }
示例#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)
 {
 }
示例#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);
示例#5
0
 public extern void ReadAsDataURL(Blob blob);
示例#6
0
 public extern void ReadAsText(Blob blob, string label = default(string));
示例#7
0
 public extern void ReadAsArrayBuffer(Blob blob);
示例#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);