Ejemplo n.º 1
0
        public void Setup()
        {
            esu = new EsuRestApi(host, port, uid, secret);

            // Disable "Expect: 100-continue" behavior
            ((EsuRestApi)esu).Set100Continue(false);
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            esu = new EsuRestApi(host, port, uid, secret);

            // Disable "Expect: 100-continue" behavior
            ((EsuRestApi)esu).Set100Continue(false);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new upload helper.
 /// </summary>
 /// <param name="esu">the API connection object to use to communicate
 /// with the server</param>
 /// <param name="buffer">the buffer used for making the transfers.  If null, a
 /// 4MB buffer will be allocated.</param>
 public UploadHelper(EsuApi esu, byte[] buffer)
 {
     this.esu = esu;
     if (buffer == null)
     {
         this.buffer = new ArraySegment <byte>(new byte[DEFAULT_BUFFSIZE]);
     }
     else
     {
         this.buffer = new ArraySegment <byte>(buffer);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new upload helper using a default 4MB buffer.
 /// </summary>
 /// <param name="api">the API connection object to use to communicate
 /// with the server</param>
 public UploadHelper(EsuApi api)
     : this(api, null)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Creates a new upload helper using a default 4MB buffer.
 /// </summary>
 /// <param name="api">the API connection object to use to communicate
 /// with the server</param>
 public UploadHelper( EsuApi api )
     : this( api, null ) {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new upload helper.
 /// </summary>
 /// <param name="esu">the API connection object to use to communicate
 /// with the server</param>
 /// <param name="buffer">the buffer used for making the transfers.  If null, a
 /// 4MB buffer will be allocated.</param>
 public UploadHelper( EsuApi esu, byte[] buffer ) {
     this.esu = esu;
     if ( buffer == null ) {
         this.buffer = new ArraySegment<byte>( new byte[DEFAULT_BUFFSIZE] );
     } else {
         this.buffer = new ArraySegment<byte>( buffer );
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates a new download helper.
 /// </summary>
 /// <param name="esuApi">the API connection object to use to communicate
 /// with the server.</param>
 /// <param name="buffer">the buffer to use for the transfers from the server.  If
 /// null, a default 4MB buffer will be used.</param>
 public DownloadHelper( EsuApi esuApi, byte[] buffer ) {
     this.esu = esuApi;
     this.buffer = new ArraySegment<byte>(
             buffer == null ? new byte[DEFAULT_BUFFSIZE] : buffer );
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a new download helper.
 /// </summary>
 /// <param name="esuApi">the API connection object to use to communicate
 /// with the server.</param>
 /// <param name="buffer">the buffer to use for the transfers from the server.  If
 /// null, a default 4MB buffer will be used.</param>
 public DownloadHelper(EsuApi esuApi, byte[] buffer)
 {
     this.esu    = esuApi;
     this.buffer = new ArraySegment <byte>(
         buffer == null ? new byte[DEFAULT_BUFFSIZE] : buffer);
 }