Example #1
0
 protected void CheckIfContainsProperty([NotNull] ComponentProcessorProperties properties, string property)
 {
     if (!properties.ContainsProperty(property))
     {
         throw new InvalidOperationException($"{GetType().FullName} processor configuration needs '{property}' element in configuration specified.");
     }
 }
Example #2
0
        private void CheckIfOnlySupportedPropertiesWereSpecified([NotNull] ComponentProcessorProperties properties, string processorName)
        {
            var supportedPropertyName = new HashSet <string>(SupportedPropertyNames);

            foreach (var property in properties)
            {
                if (!supportedPropertyName.Contains(property.Key))
                {
                    throw new InvalidOperationException($"Not supported property '{property.Key}' of '{GetType().FullName}' configuration was specified for processor '{processorName}'.");
                }
            }
        }
Example #3
0
 protected override void LoadFromPropertiesInternal(ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName)
 {
 }
Example #4
0
 protected abstract void LoadFromPropertiesInternal([NotNull] ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName);
Example #5
0
 public void LoadFromProperties([NotNull] ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName)
 {
     CheckIfOnlySupportedPropertiesWereSpecified(properties, processorName);
     LoadFromPropertiesInternal(properties, typeAliasResolver, processorName);
 }