public CategorySearcher( IRequestBuilder requestBuilder, IResourceRetriever resourceRetriever, ICategoryResourceConverter categoryResourceConverter) { _requestBuilder = requestBuilder; _resourceRetriever = resourceRetriever; _categoryResourceConverter = categoryResourceConverter; }
public PlaceSearcher( IResourceRetriever retriever, IPlacesConverter converter, IRequestBuilder requestBuilder) { _retriever = retriever; _converter = converter; _requestBuilder = requestBuilder; }
private static QueryableFactory CreateQueryableFactory(IResourceRetriever resourceRetriever, QueryBinderFactory queryBinderFactory) { return((type, uri) => { var subQueryProvider = new QueryProvider(resourceRetriever, queryBinderFactory, uri); return Activator.CreateInstance(typeof(Query <>).MakeGenericType(type), subQueryProvider) as IQueryable <object>; }); }
/// <summary> /// Instantiates a new /// <see cref="ConverterProperties"/> /// instance based on another /// <see cref="ConverterProperties"/> /// instance /// (copy constructor). /// </summary> /// <param name="other"> /// the other /// <see cref="ConverterProperties"/> /// instance /// </param> public ConverterProperties(iText.Html2pdf.ConverterProperties other) { this.mediaDeviceDescription = other.mediaDeviceDescription; this.fontProvider = other.fontProvider; this.tagWorkerFactory = other.tagWorkerFactory; this.cssApplierFactory = other.cssApplierFactory; this.baseUri = other.baseUri; this.resourceRetriever = other.resourceRetriever; this.createAcroForm = other.createAcroForm; this.outlineHandler = other.outlineHandler; this.charset = other.charset; this.metaInfo = other.metaInfo; }
/// <summary> /// Creates a new /// <see cref="ResourceResolver"/> /// instance. /// </summary> /// <remarks> /// Creates a new /// <see cref="ResourceResolver"/> /// instance. /// If /// <paramref name="baseUri"/> /// is a string that represents an absolute URI with any schema except "file" - resources /// url values will be resolved exactly as "new URL(baseUrl, uriString)". Otherwise base URI will be handled /// as path in local file system. /// <para /> /// If empty string or relative URI string is passed as base URI, then it will be resolved against current /// working directory of this application instance. /// </remarks> /// <param name="baseUri">base URI against which all relative resource URIs will be resolved</param> /// <param name="retriever">the resource retriever with the help of which data from resources will be retrieved /// </param> public ResourceResolver(String baseUri, IResourceRetriever retriever) { if (baseUri == null) { baseUri = ""; } this.uriResolver = new UriResolver(baseUri); this.imageCache = new SimpleImageCache(); if (retriever == null) { this.retriever = new DefaultResourceRetriever(); } else { this.retriever = retriever; } }
public void SetUp() { _aRequest = new Request(); _anOkHttpResponse = new HttpResponse { Success = true, StatusCode = 200, Body = "body-content" }; _anInvalidHttpResponse = new HttpResponse { Success = false, StatusCode = 400 }; _anNotFoundHttpResponse = new HttpResponse { Success = false, StatusCode = 404 }; _mockedRequestBuilder = new Mock<IHttpRequestBuilder>(); _mockedHttpClient = new Mock<IHttpClient>(); _mockedSerializer = new Mock<IXmlSerializerWrapper>(); _retriever = new ResourceRetriever( _mockedRequestBuilder.Object, _mockedHttpClient.Object, _mockedSerializer.Object); }
/// <summary> /// Instantiates a new /// <see cref="SvgProcessorContext"/> /// instance. /// </summary> /// <param name="converterProperties"> /// a /// <see cref="iText.Svg.Processors.ISvgConverterProperties"/> /// instance /// </param> public SvgProcessorContext(ISvgConverterProperties converterProperties) { deviceDescription = converterProperties.GetMediaDeviceDescription(); if (deviceDescription == null) { deviceDescription = MediaDeviceDescription.GetDefault(); } fontProvider = converterProperties.GetFontProvider(); if (fontProvider == null) { fontProvider = new BasicFontProvider(); } IResourceRetriever retriever = null; // TODO DEVSIX-3814 change the clause if block to retriever = new ResourceResolver(props.getBaseUri(), // converterProperties.getResourceRetriever()) when the ISvgConverterProperties#getResourceRetriever() is added if (converterProperties is SvgConverterProperties) { retriever = ((SvgConverterProperties)converterProperties).GetResourceRetriever(); } resourceResolver = new ResourceResolver(converterProperties.GetBaseUri(), retriever); }
public void SetUp() { _aRequest = new Request(); _anOkHttpResponse = new HttpResponse { Success = true, StatusCode = 200, Body = "body-content" }; _anInvalidHttpResponse = new HttpResponse { Success = false, StatusCode = 400 }; _anNotFoundHttpResponse = new HttpResponse { Success = false, StatusCode = 404 }; _mockedRequestBuilder = new Mock <IHttpRequestBuilder>(); _mockedHttpClient = new Mock <IHttpClient>(); _mockedSerializer = new Mock <IXmlSerializerWrapper>(); _retriever = new ResourceRetriever( _mockedRequestBuilder.Object, _mockedHttpClient.Object, _mockedSerializer.Object); }
/// <summary>Sets the resource retriever.</summary> /// <remarks> /// Sets the resource retriever. /// <para /> /// The resourceRetriever is used to retrieve data from resources by URL. /// </remarks> /// <param name="resourceRetriever">the resource retriever</param> /// <returns> /// the /// <see cref="ConverterProperties"/> /// instance /// </returns> public virtual iText.Html2pdf.ConverterProperties SetResourceRetriever(IResourceRetriever resourceRetriever ) { this.resourceRetriever = resourceRetriever; return(this); }
public ResourceViewer(IResourceRetriever <T> retriever, IResourceViewer <T, TParams> resourceViewer) { _retriever = retriever; _resourceViewer = resourceViewer; }
public CreateGif(IResourceCreator <LocalGif, LocalGifCreateParameters> gifCreator, IResourceRetriever <LocalReplay> replayRetriever) { _gifCreator = gifCreator; _replayRetriever = replayRetriever; }
public ProjectionReader(IResourceRetriever resourceRetriever, Uri uri) { _enumerator = resourceRetriever.RetrieveResource <IEnumerable <T> >(uri).Result.GetEnumerator(); }
public QueryProvider(IResourceRetriever resourceRetriever, QueryBinderFactory queryBinderFactory, Uri root) { _resourceRetriever = resourceRetriever; _queryBinderFactory = queryBinderFactory; _root = root; }
public ResourceDeleter(IResourceRetriever <T> retriever, IResourceDeleter <T> deleter) { _retriever = retriever; _deleter = deleter; }
/// <summary> /// Creates a new /// <see cref="SvgConverterProperties"/> /// instance. /// </summary> /// <remarks> /// Creates a new /// <see cref="SvgConverterProperties"/> /// instance. /// Instantiates its members, IResourceRetriever and ISvgNodeRendererFactory, to its default implementations. /// </remarks> public SvgConverterProperties() { this.resourceRetriever = new DefaultResourceRetriever(); this.rendererFactory = new DefaultSvgNodeRendererFactory(); }
/// <summary>Sets the resource retriever.</summary> /// <remarks> /// Sets the resource retriever. /// The retriever is used to retrieve data from resources by URL. /// </remarks> /// <param name="retriever">the resource retriever</param> /// <returns> /// the /// <see cref="ResourceResolver"/> /// instance /// </returns> public virtual iText.StyledXmlParser.Resolver.Resource.ResourceResolver SetRetriever(IResourceRetriever retriever ) { this.retriever = retriever; return(this); }
/// <summary>Sets the resource retriever.</summary> /// <remarks> /// Sets the resource retriever. /// The resourceRetriever is used to retrieve data from resources by URL. /// </remarks> /// <param name="resourceRetriever">the resource retriever</param> /// <returns> /// the /// <see cref="SvgConverterProperties"/> /// instance /// </returns> public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetResourceRetriever(IResourceRetriever resourceRetriever ) { this.resourceRetriever = resourceRetriever; return(this); }
/// <summary> /// Creates a new /// <see cref="HtmlResourceResolver"/> /// instance. /// </summary> /// <remarks> /// Creates a new /// <see cref="HtmlResourceResolver"/> /// instance. /// If /// <paramref name="baseUri"/> /// is a string that represents an absolute URI with any schema /// except "file" - resources url values will be resolved exactly as "new URL(baseUrl, uriString)". Otherwise base URI /// will be handled as path in local file system. /// <para /> /// If empty string or relative URI string is passed as base URI, then it will be resolved against current working /// directory of this application instance. /// </remarks> /// <param name="baseUri">base URI against which all relative resource URIs will be resolved</param> /// <param name="context"> /// /// <see cref="iText.Html2pdf.Attach.ProcessorContext"/> /// instance for the current HTML to PDF conversion process /// </param> /// <param name="retriever">the resource retriever with the help of which data from resources will be retrieved /// </param> public HtmlResourceResolver(String baseUri, ProcessorContext context, IResourceRetriever retriever) : base(baseUri, retriever) { this.context = context; }
public ResourceGetter(IResourceRetriever <T> retriever, IResourcePrinter <T> printer) { _retriever = retriever; _printer = printer; }
public ProcessReplay(IReplayLogGenerator replayLogGenerator, IResourceRetriever <LocalReplay> replayRetriever) { _replayLogGenerator = replayLogGenerator; _replayRetriever = replayRetriever; }