/trunk/MSServices/Services/Configuration/Design/MSServicesCommandRegistrar.cs

# · C# · 629 lines · 529 code · 93 blank · 7 comment · 0 complexity · 32ed81ba62053826e58b4a053c197b08 MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Microsoft.Practices.EnterpriseLibrary.Configuration.Design;
  5. using MS.Services.Configuration.Design.DefinitionGenerators;
  6. using MS.Services.Configuration.Design.Properties;
  7. using System.Windows.Forms;
  8. namespace MS.Services.Configuration.Design
  9. {
  10. public class MSServicesCommandRegistrar : CommandRegistrar
  11. {
  12. public MSServicesCommandRegistrar(IServiceProvider serviceProvider)
  13. : base(serviceProvider)
  14. {
  15. }
  16. public override void Register()
  17. {
  18. AddMSServicesSettingsCommand();
  19. AddDefaultCommands(typeof(MSServicesSettingsNode));
  20. AddServiceCommand();
  21. AddDefaultCommands(typeof(ServiceProviderNode));
  22. AddCategoryCommand();
  23. AddMoveUpDownCommands(typeof(CategoryNode));
  24. AddDefaultCommands(typeof(CategoryNode));
  25. AddAtomCommand();
  26. AddDefaultCommands(typeof(AtomNode));
  27. AddDefaultCommands(typeof(AtomCachingNode));
  28. AddDatabaseExecutorWizardCommand();
  29. AddAssemblyExecutorWizardCommand();
  30. AddRefreshParametersCommand();
  31. AddDatabaseExecutorCommand();
  32. AddSQLExecutorCommand();
  33. AddGeneratorsCommand();
  34. AddDefaultCommands(typeof(DatabaseExecutorNode));
  35. AddDefaultCommands(typeof(SQLExecutorNode));
  36. AddWebServiceGeneratorCommand();
  37. AddDefaultCommands(typeof(WebServiceGeneratorNode));
  38. AddRESTGeneratorCommand();
  39. AddDefaultCommands(typeof(RESTGeneratorNode));
  40. AddXMLRPCGeneratorCommand();
  41. AddDefaultCommands(typeof(XMLRPCGeneratorNode));
  42. AddExcelGeneratorCommand();
  43. AddDefaultCommands(typeof(ExcelGeneratorNode));
  44. AddJSONGeneratorCommand();
  45. AddDefaultCommands(typeof(JSONGeneratorNode));
  46. AddRSSGeneratorCommand();
  47. AddDefaultCommands(typeof(RSSGeneratorNode));
  48. AddTextGeneratorCommand();
  49. AddDefaultCommands(typeof(TextGeneratorNode));
  50. AddCustomGeneratorCommand();
  51. AddDefaultCommands(typeof(CustomGeneratorNode));
  52. AddRSSFieldMappingCommand();
  53. AddDefaultCommands(typeof(NameValueNode));
  54. AddAssemblyExecutorCommand();
  55. AddDefaultCommands(typeof(AssemblyExecutorNode));
  56. AddIronPythonExecutorCommand();
  57. AddDefaultCommands(typeof(IronPythonExecutorNode));
  58. AddDotNetScriptExecutorCommand();
  59. AddDefaultCommands(typeof(DotNetScriptExecutorNode));
  60. AddFileExecutorCommand();
  61. AddDefaultCommands(typeof(FileExecutorNode));
  62. AddXMLExecutorCommand();
  63. AddDefaultCommands(typeof(XMLExecutorNode));
  64. AddMSMQExecutorCommand();
  65. AddDefaultCommands(typeof(MSMQExecutorNode));
  66. AddParametersCommand();
  67. AddDefaultCommands(typeof(ParameterCollectionNode));
  68. AddParameterCommand();
  69. AddMoveUpDownCommands(typeof(ParameterNode));
  70. AddDefaultCommands(typeof(ParameterNode));
  71. AddValidatorsCommand();
  72. AddMoveUpDownCommands(typeof(MinMaxValidatorNode));
  73. AddMoveUpDownCommands(typeof(ListValidatorNode));
  74. AddMoveUpDownCommands(typeof(RegExpValidatorNode));
  75. AddMoveUpDownCommands(typeof(DatabaseValidatorNode));
  76. AddMoveUpDownCommands(typeof(SQLValidatorNode));
  77. AddMoveUpDownCommands(typeof(XMLValidatorNode));
  78. AddMoveUpDownCommands(typeof(DotNetScriptValidatorNode));
  79. AddDefaultCommands(typeof(MinMaxValidatorNode));
  80. AddDefaultCommands(typeof(ListValidatorNode));
  81. AddDefaultCommands(typeof(RegExpValidatorNode));
  82. AddDefaultCommands(typeof(DatabaseValidatorNode));
  83. AddDefaultCommands(typeof(SQLValidatorNode));
  84. AddDefaultCommands(typeof(XMLValidatorNode));
  85. AddDefaultCommands(typeof(DotNetScriptValidatorNode));
  86. AddDefaultCommands(typeof(GeneratorCollectionNode));
  87. AddShieldsCommand();
  88. AddDefaultCommands(typeof(ShieldsNode));
  89. AddDatabaseShieldCommand();
  90. AddDefaultCommands(typeof(DatabaseShieldNode));
  91. AddSQLShieldCommand();
  92. AddDefaultCommands(typeof(SQLShieldNode));
  93. AddDotNetScriptShieldCommand();
  94. AddDefaultCommands(typeof(DotNetScriptShieldNode));
  95. AddShieldParametersCommand();
  96. AddDefaultCommands(typeof(ShieldParametersNode));
  97. AddShieldParameterCommand();
  98. AddMoveUpDownCommands(typeof(ShieldParameterNode));
  99. AddDefaultCommands(typeof(ShieldParameterNode));
  100. AddShieldLinksCommand();
  101. AddDefaultCommands(typeof(ShieldLinkCollectionNode));
  102. AddShieldLinkCommand();
  103. //AddDefaultCommands(typeof(ShieldLinkNode)); /Should not remove, any parameter...
  104. AddMoveUpDownCommands(typeof(ShieldLinkNode));
  105. AddDefaultCommands(typeof(ShieldLinkNode));
  106. //AddShieldLinkParameterCommand();
  107. AddDefinitionGeneratorsCommand();
  108. AddDefaultCommands(typeof(DefinitionGeneratorsNode));
  109. AddASDLDefinitionGeneratorCommand();
  110. AddDefaultCommands(typeof(ASDLDefinitionGeneratorNode));
  111. AddJSDLDefinitionGeneratorCommand();
  112. AddDefaultCommands(typeof(JSDLDefinitionGeneratorNode));
  113. AddXSLTDefinitionGeneratorCommand();
  114. AddDefaultCommands(typeof(XSLTDefinitionGeneratorNode));
  115. AddWSDLDefinitionGeneratorCommand();
  116. AddDefaultCommands(typeof(WSDLDefinitionGeneratorNode));
  117. AddHELPDefinitionGeneratorCommand();
  118. AddDefaultCommands(typeof(HELPDefinitionGeneratorNode));
  119. }
  120. private void AddRSSFieldMappingCommand()
  121. {
  122. AddRSSFieldMappingItemCommand(Resources.RSSTitleCommandText, RSSItemField.title.ToString());
  123. AddRSSFieldMappingItemCommand(Resources.RSSLinkCommandText, RSSItemField.link.ToString());
  124. AddRSSFieldMappingItemCommand(Resources.RSSGuidCommandText, RSSItemField.guid.ToString());
  125. AddRSSFieldMappingItemCommand(Resources.RSSDescriptionCommandText, RSSItemField.description.ToString());
  126. AddRSSFieldMappingItemCommand(Resources.RSSDateCommandText, RSSItemField.date.ToString());
  127. AddRSSFieldMappingItemCommand(Resources.RSSCategoryCommandText, RSSItemField.category.ToString());
  128. AddRSSFieldMappingItemCommand(Resources.RSSAuthorCommandText, RSSItemField.author.ToString());
  129. }
  130. private void AddRSSFieldMappingItemCommand(string commandText, string title)
  131. {
  132. RSSNameValueUICommand item = new RSSNameValueUICommand(ServiceProvider, commandText, title);
  133. AddUICommand(item, typeof(RSSGeneratorNode));
  134. }
  135. private void AddRefreshParametersCommand()
  136. {
  137. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  138. Resources.RefreshParametersCommandText,
  139. Resources.RefreshParametersCommandLongText,
  140. new RefreshParametersCommand(ServiceProvider),
  141. null);
  142. AddUICommand(item, typeof(AtomNode));
  143. item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  144. Resources.RefreshParametersCommandText,
  145. Resources.RefreshParametersCommandLongText,
  146. new RefreshParametersCommand(ServiceProvider),
  147. null);
  148. AddUICommand(item, typeof(DatabaseShieldNode));
  149. }
  150. private void AddMSServicesSettingsCommand()
  151. {
  152. ConfigurationUICommand item = ConfigurationUICommand.CreateSingleUICommand(ServiceProvider,
  153. Resources.MSServicesSettingsCommandText,
  154. Resources.MSServicesSettingsCommandLongText,
  155. new MSServicesSettingsNodeCommand(ServiceProvider),
  156. typeof(MSServicesSettingsNode));
  157. AddUICommand(item, typeof(ConfigurationApplicationNode));
  158. }
  159. private void AddServiceCommand()
  160. {
  161. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  162. Resources.ServiceCommandText,
  163. Resources.GenericCommandLongText,
  164. new ServiceCommand(ServiceProvider),
  165. typeof(ServiceProviderNode));
  166. AddUICommand(item, typeof(MSServicesSettingsNode));
  167. //item = ConfigurationUICommand.CreateSingleUICommand(ServiceProvider,
  168. // Resources.ServiceCommandText,
  169. // Resources.GenericCommandLongText,
  170. // new ServiceCommand(ServiceProvider),
  171. // typeof(ServiceProviderNode));
  172. PublishServiceCommand();
  173. CollapseCommand(typeof(MSServicesSettingsNode));
  174. }
  175. private void AddAtomCommand()
  176. {
  177. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  178. Resources.AtomCommandText,
  179. string.Format(Resources.GenericCommandLongText, Resources.AtomCommandText),
  180. new AtomCommand(ServiceProvider),
  181. null);
  182. AddUICommand(item, typeof(ServiceProviderNode));
  183. item = new ManageUsersUICommand(ServiceProvider, Resources.ManageUserAuthenticationCommandText);
  184. AddUICommand(item, typeof(ServiceProviderNode));
  185. item = new ManageRolesUICommand(ServiceProvider, Resources.ManageUserRolesCommandText);
  186. AddUICommand(item, typeof(ServiceProviderNode));
  187. AddMultipleChildNodeCommand(Resources.CategoryCommandText,
  188. string.Format(Resources.GenericCommandLongText, Resources.CategoryCommandText),
  189. typeof(CategoryNode),
  190. typeof(ServiceProviderNode));
  191. AddSingleChildNodeCommand(Resources.AtomCachingNodeDisplayName,
  192. string.Format(Resources.GenericCommandLongText, Resources.AtomCachingNodeDisplayName),
  193. typeof(AtomCachingNode),
  194. typeof(AtomNode));
  195. item = new ConfigurationUICommand(ServiceProvider,
  196. Resources.MoveToCategoryNodeCommandText,
  197. Resources.MoveToCategoryNodeCommandLongText,
  198. CommandState.Enabled,
  199. new MoveToCategoryNodeCommand(ServiceProvider),
  200. Shortcut.CtrlM, InsertionPoint.Action, null);
  201. AddUICommand(item, typeof(AtomNode));
  202. CollapseCommand(typeof(ServiceProviderNode));
  203. }
  204. private void AddCategoryCommand()
  205. {
  206. AddMultipleChildNodeCommand(Resources.CategoryCommandText,
  207. string.Format(Resources.GenericCommandLongText, Resources.CategoryCommandText),
  208. typeof(CategoryNode),
  209. typeof(CategoryNode));
  210. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  211. Resources.AtomCommandText,
  212. string.Format(Resources.GenericCommandLongText, Resources.AtomCommandText),
  213. new AtomCommand(ServiceProvider),
  214. null);
  215. AddUICommand(item, typeof(CategoryNode));
  216. item = new ConfigurationUICommand(ServiceProvider,
  217. Resources.MoveToCategoryNodeCommandText,
  218. Resources.MoveToCategoryNodeCommandLongText,
  219. CommandState.Enabled,
  220. new MoveToCategoryNodeCommand(ServiceProvider),
  221. Shortcut.CtrlM, InsertionPoint.Action, null);
  222. AddUICommand(item, typeof(CategoryNode));
  223. CollapseCommand(typeof(CategoryNode));
  224. }
  225. private void CollapseCommand(Type type)
  226. {
  227. ConfigurationUICommand item = new ConfigurationUICommand(ServiceProvider,
  228. Resources.CollapseAtomCommandText,
  229. Resources.CollapseAtomCommandText,
  230. CommandState.Enabled,
  231. NodeMultiplicity.Allow,
  232. new CollapseNodesCommand(ServiceProvider),
  233. null, Shortcut.CtrlN, InsertionPoint.Action, null);
  234. AddUICommand(item, type);
  235. }
  236. private void PublishServiceCommand()
  237. {
  238. ConfigurationUICommand item = new ConfigurationUICommand(ServiceProvider,
  239. Resources.PublishServiceCommandText,
  240. Resources.PublishServiceCommandText,
  241. CommandState.Enabled,
  242. NodeMultiplicity.Allow,
  243. new PublishServiceCommand(ServiceProvider),
  244. null, Shortcut.CtrlP, InsertionPoint.Action, null);
  245. AddUICommand(item, typeof(ServiceProviderNode));
  246. }
  247. private void AddGeneratorsCommand()
  248. {
  249. AddSingleChildNodeCommand(Resources.GeneratorCollectionNodeName,
  250. string.Format(Resources.GenericCommandLongText, Resources.GeneratorCollectionNodeName),
  251. typeof(GeneratorCollectionNode),
  252. typeof(AtomNode));
  253. }
  254. private void AddWebServiceGeneratorCommand()
  255. {
  256. AddSingleChildNodeCommand(Resources.WebServiceGeneratorCommandText,
  257. string.Format(Resources.GenericCommandLongText, Resources.WebServiceGeneratorCommandText),
  258. typeof(WebServiceGeneratorNode),
  259. typeof(GeneratorCollectionNode));
  260. }
  261. private void AddRESTGeneratorCommand()
  262. {
  263. AddSingleChildNodeCommand(Resources.RESTGeneratorCommandText,
  264. string.Format(Resources.GenericCommandLongText, Resources.RESTGeneratorCommandText),
  265. typeof(RESTGeneratorNode),
  266. typeof(GeneratorCollectionNode));
  267. }
  268. private void AddXMLRPCGeneratorCommand()
  269. {
  270. AddSingleChildNodeCommand(Resources.XMLRPCGeneratorCommandText,
  271. string.Format(Resources.GenericCommandLongText, Resources.XMLRPCGeneratorCommandText),
  272. typeof(XMLRPCGeneratorNode),
  273. typeof(GeneratorCollectionNode));
  274. }
  275. private void AddExcelGeneratorCommand()
  276. {
  277. AddSingleChildNodeCommand(Resources.ExcelGeneratorCommandText,
  278. string.Format(Resources.GenericCommandLongText, Resources.ExcelGeneratorCommandText),
  279. typeof(ExcelGeneratorNode),
  280. typeof(GeneratorCollectionNode));
  281. }
  282. private void AddRSSGeneratorCommand()
  283. {
  284. AddSingleChildNodeCommand(Resources.RSSGeneratorCommandText,
  285. string.Format(Resources.GenericCommandLongText, Resources.RSSGeneratorCommandText),
  286. typeof(RSSGeneratorNode),
  287. typeof(GeneratorCollectionNode));
  288. CollapseCommand(typeof(RSSGeneratorNode));
  289. }
  290. private void AddTextGeneratorCommand()
  291. {
  292. AddSingleChildNodeCommand(Resources.TextGeneratorCommandText,
  293. string.Format(Resources.GenericCommandLongText, Resources.TextGeneratorCommandText),
  294. typeof(TextGeneratorNode),
  295. typeof(GeneratorCollectionNode));
  296. }
  297. private void AddCustomGeneratorCommand()
  298. {
  299. AddMultipleChildNodeCommand(Resources.CustomGeneratorCommandText,
  300. string.Format(Resources.GenericCommandLongText, Resources.CustomGeneratorCommandText),
  301. typeof(CustomGeneratorNode),
  302. typeof(GeneratorCollectionNode));
  303. }
  304. private void AddJSONGeneratorCommand()
  305. {
  306. AddSingleChildNodeCommand(Resources.JSONGeneratorCommandText,
  307. string.Format(Resources.GenericCommandLongText, Resources.JSONGeneratorCommandText),
  308. typeof(JSONGeneratorNode),
  309. typeof(GeneratorCollectionNode));
  310. }
  311. private void AddDatabaseExecutorCommand()
  312. {
  313. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.DatabaseExecutorCommandText, typeof(DatabaseExecutorNode));
  314. AddUICommand(item, typeof(AtomNode));
  315. }
  316. private void AddSQLExecutorCommand()
  317. {
  318. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.SQLExecutorCommandText, typeof(SQLExecutorNode));
  319. AddUICommand(item, typeof(AtomNode));
  320. }
  321. private void AddMSMQExecutorCommand()
  322. {
  323. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.MSMQExecutorCommandText, typeof(MSMQExecutorNode));
  324. AddUICommand(item, typeof(AtomNode));
  325. }
  326. private void AddAssemblyExecutorCommand()
  327. {
  328. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.AssemblyExecutorCommandText, typeof(AssemblyExecutorNode));
  329. AddUICommand(item, typeof(AtomNode));
  330. }
  331. private void AddIronPythonExecutorCommand()
  332. {
  333. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.IronPythonExecutorCommandText, typeof(IronPythonExecutorNode));
  334. AddUICommand(item, typeof(AtomNode));
  335. }
  336. private void AddDotNetScriptExecutorCommand()
  337. {
  338. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.DotNetScriptExecutorCommandText, typeof(DotNetScriptExecutorNode));
  339. AddUICommand(item, typeof(AtomNode));
  340. }
  341. private void AddFileExecutorCommand()
  342. {
  343. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.FileExecutorCommandText, typeof(FileExecutorNode));
  344. AddUICommand(item, typeof(AtomNode));
  345. }
  346. private void AddXMLExecutorCommand()
  347. {
  348. ExecutorUICommand item = new ExecutorUICommand(ServiceProvider, Resources.XMLExecutorCommandText, typeof(XMLExecutorNode));
  349. AddUICommand(item, typeof(AtomNode));
  350. }
  351. private void AddParametersCommand()
  352. {
  353. AddSingleChildNodeCommand(Resources.ParametersCommandText,
  354. Resources.ParametersCommandLongText,
  355. typeof(ParameterCollectionNode),
  356. typeof(AtomNode));
  357. CollapseCommand(typeof(AtomNode));
  358. }
  359. private void AddParameterCommand()
  360. {
  361. AddMultipleChildNodeCommand(Resources.ParameterCommandText,
  362. Resources.ParameterCommandLongText,
  363. typeof(ParameterNode),
  364. typeof(ParameterCollectionNode));
  365. }
  366. private void AddShieldsCommand()
  367. {
  368. AddSingleChildNodeCommand(Resources.ShieldsCommandText,
  369. string.Format(Resources.GenericCommandLongText, Resources.ShieldsCommandText),
  370. typeof(ShieldsNode),
  371. typeof(MSServicesSettingsNode));
  372. }
  373. private void AddDatabaseShieldCommand()
  374. {
  375. AddMultipleChildNodeCommand(Resources.DatabaseShieldCommandText,
  376. string.Format(Resources.GenericCommandLongText, Resources.DatabaseShieldCommandText),
  377. typeof(DatabaseShieldNode),
  378. typeof(ShieldsNode));
  379. }
  380. private void AddSQLShieldCommand()
  381. {
  382. AddMultipleChildNodeCommand(Resources.SQLShieldCommandText,
  383. string.Format(Resources.GenericCommandLongText, Resources.SQLShieldCommandText),
  384. typeof(SQLShieldNode),
  385. typeof(ShieldsNode));
  386. }
  387. private void AddDotNetScriptShieldCommand()
  388. {
  389. AddMultipleChildNodeCommand(Resources.DotNetScriptShieldCommandText,
  390. string.Format(Resources.GenericCommandLongText, Resources.DotNetScriptShieldCommandText),
  391. typeof(DotNetScriptShieldNode),
  392. typeof(ShieldsNode));
  393. }
  394. private void AddShieldParametersCommand()
  395. {
  396. AddSingleChildNodeCommand(Resources.ParametersCommandText,
  397. Resources.ParametersCommandLongText,
  398. typeof(ShieldParametersNode),
  399. typeof(DatabaseShieldNode));
  400. AddSingleChildNodeCommand(Resources.ParametersCommandText,
  401. Resources.ParametersCommandLongText,
  402. typeof(ShieldParametersNode),
  403. typeof(DotNetScriptShieldNode));
  404. AddSingleChildNodeCommand(Resources.ParametersCommandText,
  405. Resources.ParametersCommandLongText,
  406. typeof(ShieldParametersNode),
  407. typeof(SQLShieldNode));
  408. }
  409. private void AddShieldParameterCommand()
  410. {
  411. AddMultipleChildNodeCommand(Resources.ParameterCommandText,
  412. Resources.ParameterCommandLongText,
  413. typeof(ShieldParameterNode),
  414. typeof(ShieldParametersNode));
  415. }
  416. private void AddShieldLinksCommand()
  417. {
  418. AddSingleChildNodeCommand(Resources.ShieldLinksCommandText,
  419. string.Format(Resources.GenericCommandLongText, Resources.ShieldLinksCommandText),
  420. typeof(ShieldLinkCollectionNode),
  421. typeof(AtomNode));
  422. }
  423. private void AddShieldLinkCommand()
  424. {
  425. AddMultipleChildNodeCommand(Resources.ShieldLinkCommandText,
  426. string.Format(Resources.GenericCommandLongText, Resources.ShieldLinkCommandText),
  427. typeof(ShieldLinkNode),
  428. typeof(ShieldLinkCollectionNode));
  429. }
  430. private void AddShieldLinkParameterCommand()
  431. {
  432. AddMultipleChildNodeCommand(Resources.ShieldLinkParameterCommandText,
  433. string.Format(Resources.GenericCommandLongText, Resources.ShieldLinkParameterCommandText),
  434. typeof(ShieldLinkParameterNode),
  435. typeof(ShieldLinkNode));
  436. }
  437. private void AddValidatorsCommand()
  438. {
  439. AddMultipleChildNodeCommand(Resources.MinMaxValidatorCommandText,
  440. string.Format(Resources.GenericCommandLongText, Resources.MinMaxValidatorCommandText),
  441. typeof(MinMaxValidatorNode),
  442. typeof(ParameterNode));
  443. AddSingleChildNodeCommand(Resources.ListValidatorCommandText,
  444. string.Format(Resources.GenericCommandLongText, Resources.ListValidatorCommandText),
  445. typeof(ListValidatorNode),
  446. typeof(ParameterNode));
  447. AddSingleChildNodeCommand(Resources.RegExpValidatorCommandText,
  448. string.Format(Resources.GenericCommandLongText, Resources.RegExpValidatorCommandText),
  449. typeof(RegExpValidatorNode),
  450. typeof(ParameterNode));
  451. AddMultipleChildNodeCommand(Resources.DatabaseValidatorCommandText,
  452. string.Format(Resources.GenericCommandLongText, Resources.DatabaseValidatorCommandText),
  453. typeof(DatabaseValidatorNode),
  454. typeof(ParameterNode));
  455. AddMultipleChildNodeCommand(Resources.SQLValidatorCommandText,
  456. string.Format(Resources.GenericCommandLongText, Resources.SQLValidatorCommandText),
  457. typeof(SQLValidatorNode),
  458. typeof(ParameterNode));
  459. AddMultipleChildNodeCommand(Resources.XMLValidatorCommandText,
  460. string.Format(Resources.GenericCommandLongText, Resources.XMLValidatorCommandText),
  461. typeof(XMLValidatorNode),
  462. typeof(ParameterNode));
  463. AddMultipleChildNodeCommand(Resources.DotNetScriptValidatorCommandText,
  464. string.Format(Resources.GenericCommandLongText, Resources.DotNetScriptValidatorCommandText),
  465. typeof(DotNetScriptValidatorNode),
  466. typeof(ParameterNode));
  467. }
  468. private void AddAssemblyExecutorWizardCommand()
  469. {
  470. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  471. Resources.AssemblyExecutorWizardCommandText,
  472. Resources.AssemblyExecutorWizardCommandLongText,
  473. new AssemblyExecutorWizardCommand(ServiceProvider),
  474. null);
  475. AddUICommand(item, typeof(ServiceProviderNode));
  476. }
  477. private void AddDatabaseExecutorWizardCommand()
  478. {
  479. ConfigurationUICommand item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  480. String.Format(Resources.DatabaseExecutorWizardCommandText, "Atoms"),
  481. String.Format(Resources.DatabaseExecutorWizardCommandText, "Atoms"),
  482. new DatabaseExecutorWizardCommand(ServiceProvider),
  483. null);
  484. AddUICommand(item, typeof(ServiceProviderNode));
  485. AddUICommand(item, typeof(CategoryNode));
  486. item = ConfigurationUICommand.CreateMultipleUICommand(ServiceProvider,
  487. String.Format(Resources.DatabaseExecutorWizardCommandText, "Shields"),
  488. String.Format(Resources.DatabaseExecutorWizardCommandText, "Shields"),
  489. new DatabaseExecutorWizardCommand(ServiceProvider),
  490. null);
  491. AddUICommand(item, typeof(ShieldsNode));
  492. }
  493. private void AddDefinitionGeneratorsCommand()
  494. {
  495. AddSingleChildNodeCommand(Resources.DefinitionGeneratorsCommandText,
  496. string.Format(Resources.GenericCommandLongText, Resources.DefinitionGeneratorsCommandText),
  497. typeof(DefinitionGeneratorsNode),
  498. typeof(ServiceProviderNode));
  499. }
  500. private void AddASDLDefinitionGeneratorCommand()
  501. {
  502. AddSingleChildNodeCommand(Resources.ASDLDefinitionGeneratorNodeName,
  503. string.Format(Resources.GenericCommandLongText, Resources.ASDLDefinitionGeneratorNodeName),
  504. typeof(ASDLDefinitionGeneratorNode),
  505. typeof(DefinitionGeneratorsNode));
  506. }
  507. private void AddJSDLDefinitionGeneratorCommand()
  508. {
  509. AddSingleChildNodeCommand(Resources.JSDLDefinitionGeneratorNodeName,
  510. string.Format(Resources.GenericCommandLongText, Resources.JSDLDefinitionGeneratorNodeName),
  511. typeof(JSDLDefinitionGeneratorNode),
  512. typeof(DefinitionGeneratorsNode));
  513. }
  514. private void AddWSDLDefinitionGeneratorCommand()
  515. {
  516. AddSingleChildNodeCommand(Resources.WSDLDefinitionGeneratorNodeName,
  517. string.Format(Resources.GenericCommandLongText, Resources.WSDLDefinitionGeneratorNodeName),
  518. typeof(WSDLDefinitionGeneratorNode),
  519. typeof(DefinitionGeneratorsNode));
  520. }
  521. private void AddHELPDefinitionGeneratorCommand()
  522. {
  523. AddSingleChildNodeCommand(Resources.HELPDefinitionGeneratorNodeName,
  524. string.Format(Resources.GenericCommandLongText, Resources.HELPDefinitionGeneratorNodeName),
  525. typeof(HELPDefinitionGeneratorNode),
  526. typeof(DefinitionGeneratorsNode));
  527. }
  528. private void AddXSLTDefinitionGeneratorCommand()
  529. {
  530. AddMultipleChildNodeCommand(Resources.XSLTDefinitionGeneratorNodeName,
  531. string.Format(Resources.GenericCommandLongText, Resources.XSLTDefinitionGeneratorNodeName),
  532. typeof(XSLTDefinitionGeneratorNode),
  533. typeof(DefinitionGeneratorsNode));
  534. }
  535. }
  536. }