Skip to content

Commit

Permalink
Remove the ToHttpEncodeString method
Browse files Browse the repository at this point in the history
  • Loading branch information
devkanro committed Nov 19, 2016
1 parent 4702772 commit 1cdeb9b
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions Meta.Vlc.Wpf/Extension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,41 +122,5 @@ public static void EasyInvoke(this Action action)
{
action.BeginInvoke(ar => { action.EndInvoke(ar); }, null);
}

/// <summary>
/// Get the HTTP encoded string of a Uri.
/// </summary>
/// <param name="uri"></param>
/// <returns>The encoded string.</returns>
public static String ToHttpEncodeString(this Uri uri)
{
String uriString = uri.ToString();
StringBuilder resultBuilder = new StringBuilder(512);

if (String.IsNullOrEmpty(uriString))
{
return uriString;
}

foreach (var ch in uriString)
{
switch (ch)
{
case ' ':
resultBuilder.Append("%20");
break;

case '%':
resultBuilder.Append("%25");
break;

default:
resultBuilder.Append(ch);
break;
}
}

return resultBuilder.ToString();
}
}
}

0 comments on commit 1cdeb9b

Please sign in to comment.