Exemplo n.º 1
0
        public OsdBuilder(string shortName, string description)
        {
            if (string.IsNullOrEmpty(shortName))
            {
                throw new ArgumentNullException("shortName");
            }

            if (string.IsNullOrEmpty(description))
            {
                throw new ArgumentNullException("description");
            }

            //if (shortName.Length > 16)
            //    throw new ArgumentOutOfRangeException("shortName", "shortName must be contain less then 16 characters.");

            //if (description.Length > 1024)
            //    throw new ArgumentOutOfRangeException("description", "shortName must be contain less then 1024 characters.");

            osd = new OpenSearchDescription()
            {
                ShortName   = shortName,
                Description = description,
                Urls        = new List <OpenSearchUrl>()
            };
        }
Exemplo n.º 2
0
        public OsdBuilder(string shortName, string description)
        {
            if (string.IsNullOrEmpty(shortName))
                throw new ArgumentNullException("shortName");

            if (string.IsNullOrEmpty(description))
                throw new ArgumentNullException("description");

            //if (shortName.Length > 16)
            //    throw new ArgumentOutOfRangeException("shortName", "shortName must be contain less then 16 characters.");

            //if (description.Length > 1024)
            //    throw new ArgumentOutOfRangeException("description", "shortName must be contain less then 1024 characters.");

            osd = new OpenSearchDescription()
            {
                ShortName = shortName,
                Description = description,
                Urls = new List<OpenSearchUrl>()
            };
        }