/// <summary> /// This method contains the routine which has to be executed when a request /// stream will be disposed and will be called autoamtically /// </summary> private static void DisposeWebRequestStreams(params object[] arg) { // get the params var request = arg[0] as WebRequest; var stream = arg[1] as WebRequestStream; // check if we have a multipart upload var md = new WebRequestMultipartFormDataSupport(); if (md.IsRequestMultiPartUpload(request)) { md.FinalizeNetworkFileDataStream(stream); } }
/// <summary> /// This method contains the routine which has to be executed when a request /// stream will be disposed and will be called autoamtically /// </summary> private void DisposeWebRequestStreams(params object[] arg) { // get the params WebRequest request = arg[0] as WebRequest; WebRequestStream stream = arg[1] as WebRequestStream; // check if we have a multipart upload WebRequestMultipartFormDataSupport md = new WebRequestMultipartFormDataSupport(); if (md.IsRequestMultiPartUpload(request)) { md.FinalizeNetworkFileDataStream(stream); } #if WINDOWS_PHONE // Close Stream Bugfix for WP7 stream.Close(); #endif }
/// <summary> /// This method contains the routine which has to be executed when a request /// stream will be disposed and will be called autoamtically /// </summary> private void DisposeWebRequestStreams(params object[] arg) { // get the params WebRequest request = arg[0] as WebRequest; WebRequestStream stream = arg[1] as WebRequestStream; // check if we have a multipart upload WebRequestMultipartFormDataSupport md = new WebRequestMultipartFormDataSupport(); if (md.IsRequestMultiPartUpload(request)) md.FinalizeNetworkFileDataStream(stream); #if WINDOWS_PHONE // Close Stream Bugfix for WP7 stream.Close(); #endif }