[Modify] Add it

This commit is contained in:
sta 2016-11-17 16:23:19 +09:00
parent b05a3098cf
commit bc4b4a9d8e

View File

@ -964,6 +964,22 @@ namespace WebSocketSharp
return true; return true;
} }
internal static bool TryOpenRead (
this FileInfo fileInfo, out FileStream fileStream
)
{
fileStream = null;
try {
fileStream = fileInfo.OpenRead ();
}
catch {
return false;
}
return true;
}
internal static string Unquote (this string value) internal static string Unquote (this string value)
{ {
var start = value.IndexOf ('"'); var start = value.IndexOf ('"');