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"); } }
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)) { }