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); }
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); }