示例#1
0
        private static CrawlingConditionFieldType Create(string name, bool requireParam, Func <Uri, string, string> extractValue)
        {
            CrawlingConditionFieldType element = new CrawlingConditionFieldType(name, requireParam, extractValue);

            Mapping.Add(element.Name, element);
            return(element);
        }
示例#2
0
        private static CrawlingCondition DeserializeCondition(XElement element)
        {
            CrawlingCondition condition = new CrawlingCondition
            {
                Guid           = (Guid)element.Attribute("Guid"),
                ComparisonType = CrawlingConditionComparisonType.Parse((string)element.Attribute("ComparisonType")),
                FieldType      = CrawlingConditionFieldType.Parse((string)element.Attribute("FieldType")),
                Value          = (string)element.Attribute("Value")
            };

            return(condition);
        }