Ejemplo n.º 1
0
        public static ServicesEnum ValueOf(string serviceName)
        {
            ServicesEnum result = null;

            foreach (var temp in Values)
            {
                if (temp.ServiceName.Equals(serviceName))
                {
                    result = temp;
                }
            }

            return(result);
        }
Ejemplo n.º 2
0
        public static (string service, string parsedLink, string fileName, bool isFileExist) ParseLink([NotNull] string link)
        {
            Log.Debug("start -- ParseLink(string)");
            Log.Debug("link = " + link);
            var service    = GetService(link);
            var htmlCutter = ServicesEnum.ValueOf(service).CreateInstace();

            htmlCutter.Initialize(link);
            var parsedLink = htmlCutter.DirectLink;
            var fileName   = htmlCutter.FileName;

            Log.Debug("end -- ParseLink(String)");
            return(service, parsedLink, fileName, htmlCutter.IsFileExist);
        }