private void Map(CrawlBehaviorElement src, CrawlConfiguration dest)
 {
     dest.MaxConcurrentThreads                       = src.MaxConcurrentThreads;
     dest.MaxPagesToCrawl                            = src.MaxPagesToCrawl;
     dest.MaxPagesToCrawlPerDomain                   = src.MaxPagesToCrawlPerDomain;
     dest.MaxPageSizeInBytes                         = src.MaxPageSizeInBytes;
     dest.UserAgentString                            = src.UserAgentString;
     dest.HttpProtocolVersion                        = GetHttpProtocolVersion(src);
     dest.CrawlTimeoutSeconds                        = src.CrawlTimeoutSeconds;
     dest.IsUriRecrawlingEnabled                     = src.IsUriRecrawlingEnabled;
     dest.IsExternalPageCrawlingEnabled              = src.IsExternalPageCrawlingEnabled;
     dest.IsExternalPageLinksCrawlingEnabled         = src.IsExternalPageLinksCrawlingEnabled;
     dest.IsRespectUrlNamedAnchorOrHashbangEnabled   = src.IsRespectUrlNamedAnchorOrHashbangEnabled;
     dest.DownloadableContentTypes                   = src.DownloadableContentTypes;
     dest.HttpServicePointConnectionLimit            = src.HttpServicePointConnectionLimit;
     dest.HttpRequestTimeoutInSeconds                = src.HttpRequestTimeoutInSeconds;
     dest.HttpRequestMaxAutoRedirects                = src.HttpRequestMaxAutoRedirects;
     dest.IsHttpRequestAutoRedirectsEnabled          = src.IsHttpRequestAutoRedirectsEnabled;
     dest.IsHttpRequestAutomaticDecompressionEnabled = src.IsHttpRequestAutomaticDecompressionEnabled;
     dest.IsSendingCookiesEnabled                    = src.IsSendingCookiesEnabled;
     dest.IsSslCertificateValidationEnabled          = src.IsSslCertificateValidationEnabled;
     dest.MinAvailableMemoryRequiredInMb             = src.MinAvailableMemoryRequiredInMb;
     dest.MaxMemoryUsageInMb                         = src.MaxMemoryUsageInMb;
     dest.MaxMemoryUsageCacheTimeInSeconds           = src.MaxMemoryUsageCacheTimeInSeconds;
     dest.MaxCrawlDepth               = src.MaxCrawlDepth;
     dest.MaxLinksPerPage             = src.MaxLinksPerPage;
     dest.IsForcedLinkParsingEnabled  = src.IsForcedLinkParsingEnabled;
     dest.MaxRetryCount               = src.MaxRetryCount;
     dest.MinRetryDelayInMilliseconds = src.MinRetryDelayInMilliseconds;
 }
        private HttpProtocolVersion GetHttpProtocolVersion(CrawlBehaviorElement src)
        {
            switch (src.HttpProtocolVersion)
            {
            case "1.0":
                return(HttpProtocolVersion.Version10);

            case "1.1":
                return(HttpProtocolVersion.Version11);

            default:
                return(HttpProtocolVersion.NotSpecified);
            }
        }