public JsonRpcProxyGenerator(MessageBroker messageBroker) : base(messageBroker) { _generators = new Hashtable(); _generators.Add("default", new DefaultJsonRpcProxyGenerator()); try { JsonRpcGeneratorCollection generatorSettings = FluorineConfiguration.Instance.FluorineSettings.JSonSettings.JsonRpcGenerators; for (int i = 0; i < generatorSettings.Count; i++) { JsonRpcGenerator generatorSetting = generatorSettings[i]; IJsonRpcProxyGenerator generator = ObjectFactory.CreateInstance(generatorSetting.Type) as IJsonRpcProxyGenerator; if (generator != null) { _generators.Add(generatorSetting.Name, generator); } else { if (log.IsErrorEnabled) { log.Error(string.Format("JsonRpcGenerator {0} was not found", generatorSetting.Name)); } } } } catch (Exception ex) { log.Fatal("Creating JsonRpcProxyGenerator failed", ex); } }
public JsonRpcProxyGenerator(MessageBroker messageBroker) : base(messageBroker) { this._lastModifiedTime = DateTime.MinValue; this._generators = new Hashtable(); this._generators.Add("default", new DefaultJsonRpcProxyGenerator()); try { JsonRpcGeneratorCollection jsonRpcGenerators = FluorineConfiguration.Instance.FluorineSettings.JSonSettings.JsonRpcGenerators; for (int i = 0; i < jsonRpcGenerators.Count; i++) { JsonRpcGenerator generator = jsonRpcGenerators[i]; IJsonRpcProxyGenerator generator2 = ObjectFactory.CreateInstance(generator.Type) as IJsonRpcProxyGenerator; if (generator2 != null) { this._generators.Add(generator.Name, generator2); } else if (log.get_IsErrorEnabled()) { log.Error(string.Format("JsonRpcGenerator {0} was not found", generator.Name)); } } } catch (Exception exception) { log.Fatal("Creating JsonRpcProxyGenerator failed", exception); } }
static void Main(string[] args) { MarkdownGenerator markdownGenerator = new MarkdownGenerator(); JsonRpcGenerator rpcGenerator = new JsonRpcGenerator(markdownGenerator); rpcGenerator.Generate(); }
static void Main(string[] args) { MarkdownGenerator markdownGenerator = new MarkdownGenerator(); SharedContent sharedContent = new SharedContent(); JsonRpcGenerator rpcGenerator = new JsonRpcGenerator(markdownGenerator, sharedContent); rpcGenerator.Generate(); CliGenerator cliGenerator = new CliGenerator(markdownGenerator, sharedContent); cliGenerator.Generate(); MetricsGenerator metricsGenerator = new MetricsGenerator(sharedContent); metricsGenerator.Generate(); ConfigGenerator configGenerator = new ConfigGenerator(sharedContent); configGenerator.Generate(); }