Ejemplo n.º 1
0
        /// <summary>
        /// 根据时间获取路径
        /// </summary>
        /// <param name="time">时间</param>
        /// <returns></returns>
        public override FileOption Get(Time time)
        {
            ELMarkerReplaceService service = new ELMarkerReplaceService(ELMarkerReplaceService.GetTimeKeyWordDictionary(time));
            var list = service.Get(PathModels);

            return(new FileOption(list));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 替换一个
        /// </summary>
        /// <param name="time"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        public static string BuildWithTime(string model, Time time, int HourInterval = 6, int minutInterval = 1, int secondInterval = 1)
        {
            var dic = GetTimeKeyWordDictionary(time, HourInterval, minutInterval, secondInterval);

            var replacer = new ELMarkerReplaceService(dic, HourInterval);

            return(replacer.Get(model));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 构建远程路径
        /// </summary>
        /// <param name="time"></param>
        /// <param name="fileType"></param>
        /// <returns></returns>
        private string BuildUrl(Time time, string fileType)
        {
            Dictionary <string, string> dic = ELMarkerReplaceService.GetTimeKeyWordDictionary(time);

            dic.Add(ELMarker.ProductType, fileType.ToString());
            ELMarkerReplaceService elService = new Geo.ELMarkerReplaceService(dic);
            var url = elService.Get(urlModel);

            return(url);
        }