private static IConfigurationStrategy GetConfigurationStrategy(IEnumerable<Type> serviceTypes, ConfigurationStrategy configurationStrategy)
 {
     switch (configurationStrategy)
     {
         case CodeGeneration.ConfigurationStrategy.Http:
             return new HttpConfigurationStrategy(serviceTypes, false);
         case CodeGeneration.ConfigurationStrategy.HttpWithMex:
             return new HttpConfigurationStrategy(serviceTypes, true);
         case CodeGeneration.ConfigurationStrategy.WsHttp:
             return new WsHttpConfigurationStrategy(serviceTypes, false);
         case CodeGeneration.ConfigurationStrategy.WsHttpWithMex:
             return new WsHttpConfigurationStrategy(serviceTypes, true);
         default:
             throw new ArgumentOutOfRangeException("configurationStrategy");
     }
 }
Exemple #2
0
        private static IConfigurationStrategy GetConfigurationStrategy(IEnumerable <Type> serviceTypes, ConfigurationStrategy configurationStrategy)
        {
            switch (configurationStrategy)
            {
            case CodeGeneration.ConfigurationStrategy.Http:
                return(new HttpConfigurationStrategy(serviceTypes, false));

            case CodeGeneration.ConfigurationStrategy.HttpWithMex:
                return(new HttpConfigurationStrategy(serviceTypes, true));

            case CodeGeneration.ConfigurationStrategy.WsHttp:
                return(new WsHttpConfigurationStrategy(serviceTypes, false));

            case CodeGeneration.ConfigurationStrategy.WsHttpWithMex:
                return(new WsHttpConfigurationStrategy(serviceTypes, true));

            default:
                throw new ArgumentOutOfRangeException("configurationStrategy");
            }
        }
 public ConfigGenerationData(string[] serviceTypesPatterns, ConfigurationStrategy configurationStrategy)
     : this(serviceTypesPatterns, GetConfigurationStrategy(
         ConfigGenertionUtils.GetServiceTypesByRegularExpressions(serviceTypesPatterns),
         configurationStrategy))
 {
 }
Exemple #4
0
 public ConfigGenerationData(string[] serviceTypesPatterns, ConfigurationStrategy configurationStrategy)
     : this(serviceTypesPatterns, GetConfigurationStrategy(
                ConfigGenertionUtils.GetServiceTypesByRegularExpressions(serviceTypesPatterns),
                configurationStrategy))
 {
 }