public VippyVideoSelectionQuery(VippyWrapper.VippyWrapper vippyWrapper) { if (vippyWrapper == null) { throw new ArgumentNullException("vippyWrapper"); } _vippyWrapper = vippyWrapper; }
public VirtualPathProvider(string name, NameValueCollection configParameters) : base(name, configParameters) { ValidateAndSetupConfigParams(); VirtualPathRoot = VirtualPathUtility.ToAbsolute(ConfigurationParameters["virtualPath"]); _root = new RootDirectory(this); _vippyClient = new VippyWrapper.VippyWrapper(ConfigurationParameters["apiKey"], ConfigurationParameters["secretKey"]); }
private IEnumerable<Video> GetVideos() { string cacheKey = "vippyvideos"; var videos = HttpRuntime.Cache.Get(cacheKey) as List<Video>; if (videos == null) { var wrapper = new VippyWrapper.VippyWrapper(VippyConfiguration.ApiKey, VippyConfiguration.SecretKey); videos = (wrapper.GetVideos().Result).ToList(); HttpRuntime.Cache.Insert(cacheKey, videos, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(1)); } return videos; }
private IEnumerable <Video> GetVideos() { string cacheKey = "vippyvideos"; var videos = HttpRuntime.Cache.Get(cacheKey) as List <Video>; if (videos == null) { var wrapper = new VippyWrapper.VippyWrapper(VippyConfiguration.ApiKey, VippyConfiguration.SecretKey); videos = (wrapper.GetVideos().Result).ToList(); HttpRuntime.Cache.Insert(cacheKey, videos, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(1)); } return(videos); }
public VippyVideoSelectionQuery(VippyWrapper.VippyWrapper vippyWrapper) { if (vippyWrapper == null) throw new ArgumentNullException("vippyWrapper"); _vippyWrapper = vippyWrapper; }