コード例 #1
0
ファイル: OsdBuilder.cs プロジェクト: mythocalos/dotnetage
        public OpenSearchUrl AddSearchUrl(string template, string type = "application/opensearchdescription+xml",
                                          OpenSearchUrlRelValues?rel   = OpenSearchUrlRelValues.Results)
        {
            if (string.IsNullOrEmpty(template))
            {
                throw new ArgumentNullException(template);
            }
            var _url = new OpenSearchUrl()
            {
                Type     = type,
                Rel      = rel.Value,
                Template = template
            };

            osd.Urls.Add(_url);
            return(_url);
        }
コード例 #2
0
ファイル: OsdBuilder.cs プロジェクト: howej/dotnetage
 public OpenSearchUrl AddSearchUrl(string template, string type = "application/opensearchdescription+xml",
     OpenSearchUrlRelValues? rel = OpenSearchUrlRelValues.Results)
 {
     if (string.IsNullOrEmpty(template))
         throw new ArgumentNullException(template);
     var _url = new OpenSearchUrl()
     {
         Type = type,
         Rel = rel.Value,
         Template = template
     };
     osd.Urls.Add(_url);
     return _url;
 }