/// <inheritdoc /> protected override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) { base.DeserializeElement(reader, serializeCollectionKey); AssignableFromTypeValidator validator = new AssignableFromTypeValidator(typeof(IPollingJob)); try { validator.Validate(this.ImplementationType); } catch (ConfigurationErrorsException ex) { throw new ConfigurationErrorsException(ex.Message, reader); } }
/// <inheritdoc /> protected override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) { base.DeserializeElement(reader, serializeCollectionKey); AssignableFromTypeValidator validator = new AssignableFromTypeValidator(this.ContractType); try { validator.Validate(this.ImplementationType); } catch (ConfigurationErrorsException ex) { throw new ConfigurationErrorsException(ex.Message, ex, reader); } if (this.IsSelfRegistration && !this.IsShared) { throw new ConfigurationErrorsException("'{0}' must be registered as shared.".FormatInvariant(typeof(RadoslavServiceLocator)), reader); } }