示例#1
0
 protected override void LoadFromPropertiesInternal(ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string procesorName)
 {
     if (properties.ContainsProperty(nameof(CodeProvider)))
     {
         var odeProviderAlias = properties.GetProperty(nameof(CodeProvider));
         var codeProviderType = typeAliasResolver.ResolveType(odeProviderAlias);
         CodeProvider = (CodeProvider <MethodCodeInjectingCodeProviderArgument>)Activator.CreateInstance(codeProviderType);
     }
     else
     {
         CodeProvider = GetDefaultCodeProvider();
     }
 }
示例#2
0
 protected override void LoadFromPropertiesInternal([NotNull] ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string processorName)
 {
     if (properties.ContainsProperty(nameof(CustomAttributeProvider)))
     {
         var customAttributeProviderAlias = properties.GetProperty(nameof(CustomAttributeProvider));
         var customAttributeProviderType  = typeAliasResolver.ResolveType(customAttributeProviderAlias);
         CustomAttributeProvider = (AttributeProvider)Activator.CreateInstance(customAttributeProviderType);
     }
     else
     {
         CustomAttributeProvider = GetDefaultCodeProvider();
     }
 }
示例#3
0
        protected override void LoadFromPropertiesInternal(ComponentProcessorProperties properties, TypeAliasResolver typeAliasResolver, string procesorName)
        {
            if (properties.ContainsProperty(nameof(CustomValueHandlingCodeProvider)))
            {
                var customValueHandlingCodeProviderAlias = properties.GetProperty(nameof(CustomValueHandlingCodeProvider));
                var customValueHandlingCodeProviderType  = typeAliasResolver.ResolveType(customValueHandlingCodeProviderAlias);
                CustomValueHandlingCodeProvider = (CodeProvider <ParameterValueHandlingCodeProviderArgument>)Activator.CreateInstance(customValueHandlingCodeProviderType);
            }
            else
            {
                CustomValueHandlingCodeProvider = GetDefaultCodeProvider();
            }

            properties.TryGetProperty(nameof(StateInstanceName), out stateInstanceName);
        }