Beispiel #1
0
 // Token: 0x0600194D RID: 6477 RVA: 0x00058151 File Offset: 0x00056351
 protected override int GetMaxByteCount(Uri responseUri)
 {
     if (AmazonLinkPreviewBuilder.IsAmazonUri(responseUri))
     {
         return(491520);
     }
     if (responseUri.Host != null && responseUri.Host.ToUpper().Equals("WWW.GROUPON.COM", StringComparison.Ordinal))
     {
         return(98304);
     }
     return(32768);
 }
Beispiel #2
0
        // Token: 0x0600194A RID: 6474 RVA: 0x00057EF4 File Offset: 0x000560F4
        public override GetLinkPreviewResponse CreatePreview(DataProviderInformation dataProviderInformation)
        {
            string text = ((WebPageInformation)dataProviderInformation).Text;
            Dictionary <string, string> queryParmDictionary;
            LinkPreviewBuilder          linkPreviewBuilder;

            if (YouTubeLinkPreviewBuilder.TryGetYouTubePlayerQueryParms(dataProviderInformation.ResponseUri, this.logger, out queryParmDictionary))
            {
                linkPreviewBuilder = new YouTubeLinkPreviewBuilder(queryParmDictionary, this.request, text, this.logger, dataProviderInformation.ResponseUri);
            }
            else if (AmazonLinkPreviewBuilder.IsAmazonUri(dataProviderInformation.ResponseUri))
            {
                linkPreviewBuilder = new AmazonLinkPreviewBuilder(this.request, text, this.logger, dataProviderInformation.ResponseUri);
            }
            else if (CraigsListLinkPreviewBuilder.IsCraigsListUri(dataProviderInformation.ResponseUri))
            {
                linkPreviewBuilder = new CraigsListLinkPreviewBuilder(this.request, text, this.logger, dataProviderInformation.ResponseUri);
            }
            else
            {
                linkPreviewBuilder = new WebPageLinkPreviewBuilder(this.request, text, this.logger, dataProviderInformation.ResponseUri, false);
            }
            return(linkPreviewBuilder.Execute());
        }