public Dictionary <String, Object> Resolve(RQModel.PlayListViewModel source, BLModel.PlayList des, Dictionary <String, Object> d, ResolutionContext context)
        {
            Dictionary <String, Object> props = new Dictionary <String, Object>();

            props.Add("IsAVMUX", source.IsAVMUX);
            props.Add("MediaContainer", source.MediaContainer);
            props.Add("Encryption", source.Encryption);
            props.Add("DRMAccess", source.DRMAccess);
            props.Add("DRMWideVine", source.DRMWideVine);
            props.Add("DRMFairPlay", source.DRMFairPlay);
            props.Add("DRMClearKey", source.DRMClearKey);
            props.Add("AssetId", source.AssetId);
            if (!source.ProtectionType.IsNullOrEmpty())
            {
                props.Add("ProtectionType", source.ProtectionType);
            }
            return(props);
        }
        public List <Dictionary <String, BLModel.Url> > Resolve(RQModel.PlayListViewModel source, BLModel.PlayList des, List <Dictionary <String, BLModel.Url> > d, ResolutionContext context)
        {
            List <Dictionary <String, BLModel.Url> > urls = new List <Dictionary <String, BLModel.Url> >();
            Regex regex = new Regex(@"^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$");

            foreach (var translatedUrl in source.TranslatedUrls)
            {
                if (!string.IsNullOrEmpty(translatedUrl.Url))
                {
                    var matches = regex.Match(translatedUrl.Url);
                    urls.Add(BuildUrlFor(matches, translatedUrl.UrlType));
                }
            }
            return(urls);
        }