markus / KCOM / Common / Check_Uri.cs @ d71b4688
이력 | 보기 | 이력해설 | 다운로드 (710 Bytes)
1 | e1fb3d16 | ljiyeon | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | namespace KCOM.Common |
||
8 | { |
||
9 | class Check_Uri |
||
10 | { |
||
11 | public static void UriCheck(string filepath) |
||
12 | { |
||
13 | if (!(Uri.TryCreate(filepath, UriKind.Absolute, out Uri uri) && uri.Scheme == Uri.UriSchemeHttp)) |
||
14 | { |
||
15 | throw new Exception(); |
||
16 | } |
||
17 | } |
||
18 | d71b4688 | ljiyeon | |
19 | public static bool UriCheckBool(string filepath) |
||
20 | { |
||
21 | if (!(Uri.TryCreate(filepath, UriKind.Absolute, out Uri uri) && uri.Scheme == Uri.UriSchemeHttp)) |
||
22 | { |
||
23 | return false; |
||
24 | } |
||
25 | return true; |
||
26 | } |
||
27 | e1fb3d16 | ljiyeon | } |
28 | } |