Ejemplo n.º 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.");
     }
 }
Ejemplo n.º 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}'.");
                }
            }
        }
Ejemplo n.º 3
0
 protected override void LoadFromPropertiesInternal(ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName)
 {
 }
Ejemplo n.º 4
0
 protected abstract void LoadFromPropertiesInternal([NotNull] ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName);
Ejemplo n.º 5
0
 public void LoadFromProperties([NotNull] ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName)
 {
     CheckIfOnlySupportedPropertiesWereSpecified(properties, processorName);
     LoadFromPropertiesInternal(properties, typeAliasResolver, processorName);
 }