/// <summary> /// Fills the uri with tests. /// </summary> /// <param name="url"> The url.</param> /// <param name="uriType"> The WebServerUriType type.</param> /// <returns> The updated uri.</returns> public Uri FillUri(Uri url, WebServerUriType uriType) { BufferOverflowGenerator gen = new BufferOverflowGenerator(); string buffer = gen.GenerateStringBuffer(this.BufferLength); // chop extra chars buffer = buffer.Substring(0,this.BufferLength); buffer = EncodeDecode.UrlEncode(buffer); // copy url Uri temp = new Uri(url.ToString()); UriGenerator generator = new UriGenerator(); try { temp = generator.GenerateUri(uriType, temp, buffer); return temp; } catch (Exception ex) { ExceptionHandler.RegisterException(ex); return url; } }
/// <summary> /// Fills the uri with tests. /// </summary> /// <param name="url"> The url.</param> /// <param name="uriType"> The WebServerUriType type.</param> /// <returns> The updated uri.</returns> public Uri FillUri(Uri url, WebServerUriType uriType) { string buffer = this.SqlValue; // copy url Uri temp = new Uri(url.ToString()); UriGenerator generator = new UriGenerator(); try { temp = generator.GenerateUri(uriType, temp, buffer); return temp; } catch (Exception ex) { ExceptionHandler.RegisterException(ex); return url; } }
/// <summary> /// Fills the uri with tests. /// </summary> /// <param name="url"> The url.</param> /// <param name="uriType"> The WebServerUriType type.</param> /// <returns> The updated uri.</returns> public Uri FillUri(Uri url, WebServerUriType uriType) { string buffer = String.Empty; switch ( this.SelectedDataType ) { case DataType.Character: buffer = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; break; case DataType.Numeric: buffer = "0123456789"; break; case DataType.Null: buffer = ""; break; } // copy url Uri temp = new Uri(url.ToString()); UriGenerator generator = new UriGenerator(); try { temp = generator.GenerateUri(uriType, temp, buffer); return temp; } catch (Exception ex) { ExceptionHandler.RegisterException(ex); return url; } }