public void ReadFrom(XmlElement jobConfigurationElement) { //RequestMaxAttempts if (jobConfigurationElement.HasAttribute("RequestMaxAttempts")) { Debug.Assert(jobConfigurationElement != null, "jobConfigurationElement != null"); var requestMaxAttemptsElement = jobConfigurationElement.GetAttribute("RequestMaxAttempts"); RequestMaxAttempts = Int32.Parse(requestMaxAttemptsElement); } //RequestTimeout if (jobConfigurationElement.HasAttribute("RequestTimeout")) { var requestTimeoutElement = jobConfigurationElement.GetAttribute("RequestTimeout"); RequestTimeout = TimeSpan.FromMilliseconds(Int32.Parse(requestTimeoutElement)); } //JobAndWorkerType var jobAndWorkerTypeElement = (XmlElement)jobConfigurationElement.GetElementsByTagName("JobAndWorkerType")[0]; JobAndWorkerType = new JobAndWorkerType(); JobAndWorkerType.ReadFrom(jobAndWorkerTypeElement); }