/// <summary>
 ///     Configurable ctor for <see cref="HttpContentLoader" />.
 /// </summary>
 /// <param name="config">
 ///     <list type="bullet">
 ///         <listheader>
 ///             <description>Supported <see cref="BVClientConfig" /> properties</description>
 ///         </listheader>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.CONNECT_TIMEOUT" />
 ///             </description>
 ///         </item>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.SOCKET_TIMEOUT" />
 ///             </description>
 ///         </item>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.PROXY_PORT" />
 ///             </description>
 ///         </item>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.PROXY_HOST" />
 ///             </description>
 ///         </item>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.CHARSET" />
 ///             </description>
 ///         </item>
 ///     </list>
 /// </param>
 /// <param name="userAgent">
 ///     Browser and system details to be forwarded as the <see cref="HttpRequestHeader.UserAgent" />
 ///     when loading content via HTTP.
 /// </param>
 public HttpContentLoader(BVConfiguration config, string userAgent)
 {
     ConnectionTimeout = int.Parse(config.getProperty(BVClientConfig.CONNECT_TIMEOUT));
     SocketTimeout     = int.Parse(config.getProperty(BVClientConfig.SOCKET_TIMEOUT));
     ProxyPort         = int.Parse(config.getProperty(BVClientConfig.PROXY_PORT));
     ProxyHost         = config.getProperty(BVClientConfig.PROXY_HOST);
     Encoding          = EncodingParser.GetEncoding(config.getProperty(BVClientConfig.CHARSET));
     UserAgent         = userAgent;
 }
示例#2
0
 /// <summary>
 ///     Configurable ctor for <see cref="FileContentLoader" />.
 /// </summary>
 /// <param name="config">
 ///     <list type="bullet">
 ///         <listheader>
 ///             <description>Supported <see cref="BVClientConfig" /> properties</description>
 ///         </listheader>
 ///         <item>
 ///             <description>
 ///                 <see cref="BVClientConfig.CHARSET" />
 ///             </description>
 ///         </item>
 ///     </list>
 /// </param>
 public FileContentLoader(BVConfiguration config)
 {
     Encoding = EncodingParser.GetEncoding(config.getProperty(BVClientConfig.CHARSET));
 }