OSDN Git Service

na-get-lib,provider.list.txtからrepos.list.xmlへ移行
[applistation/AppliStation.git] / na-get-lib / NaGet.Packages / ProviderList.cs
1 using System;\r
2 using System.IO;\r
3 using System.Collections.Generic;\r
4 \r
5 namespace NaGet.Packages\r
6 {\r
7         /// <summary>\r
8         /// パッケージリストを提供するプロバイダのリストを示すクラス\r
9         /// </summary>\r
10         [Obsolete]\r
11         public class ProviderList\r
12         {\r
13                 /// <summary>\r
14                 /// パッケージリストのリソースURLの配列\r
15                 /// </summary>\r
16                 public string[] Urls;\r
17                 \r
18                 /// <summary>\r
19                 /// コンストラクタ\r
20                 /// </summary>\r
21                 public ProviderList()\r
22                 {\r
23                 }\r
24 \r
25                 /// <summary>\r
26                 /// コンストラクタ\r
27                 /// </summary>\r
28                 /// <param name="path">プロバイダリストのファイルのパス</param>\r
29                 public ProviderList(string path)\r
30                 {\r
31                         List<string> providerList = new List<string>();\r
32                         using(StreamReader reader = new StreamReader(path)) {\r
33                                 string line;\r
34                                 while ((line = reader.ReadLine()) != null) {\r
35                                         providerList.Add(line);\r
36                                 }\r
37                         }\r
38                         \r
39                         Urls = providerList.ToArray();\r
40                 }\r
41         }\r
42 }\r