Esempio n. 1
0
 public HelpForControllers(ICollection<Controller> classAndMethodRecognizers, TypeContainer container,
     HelpXmlDocumentation helpXmlDocumentation = null)
 {
     _container = container;
     _classAndMethodRecognizers = classAndMethodRecognizers;
     _helpXmlDocumentation = helpXmlDocumentation ?? new HelpXmlDocumentation();
 }
Esempio n. 2
0
 public void Can_get_same_key_as_in_xmldoc()
 {
     var helpXml = new HelpXmlDocumentation();
     var _global = typeof(FullConfiguration).GetMethods().Single(m=>m.Name.EndsWith("Global") && m.Name.StartsWithIC("set"));
     Assert.That(helpXml.GetKey(_global), Is.EqualTo("P:Isop.Tests.FakeConfigurations.FullConfiguration.Global"));
     var action1 = typeof(DescriptionWithCommentsController).GetMethods().Single(m=>m.Name.Equals("Action1"));
     Assert.That(helpXml.GetKey(action1), Is.EqualTo("M:Isop.Tests.FakeControllers.DescriptionWithCommentsController.Action1"));
 }
Esempio n. 3
0
        public HelpForControllers(ICollection<Type> classAndMethodRecognizers, TypeContainer container, 
            TurnParametersToArgumentWithOptions turnParametersToArgumentWithOptions,
            HelpXmlDocumentation helpXmlDocumentation = null)
        {
            _container = container;
            _turnParametersToArgumentWithOptions = turnParametersToArgumentWithOptions;
            _classAndMethodRecognizers = classAndMethodRecognizers;
            _helpXmlDocumentation = helpXmlDocumentation ?? new HelpXmlDocumentation();
            HelpSubCommandForMoreInformation = "Se 'COMMANDNAME' help <command> <subcommand> for more information";

            HelpCommandForMoreInformation = "Se 'COMMANDNAME' help <command> for more information";
            TheCommandsAre = "The commands are:";
            TheSubCommandsFor = "The sub commands for ";
            _andAcceptTheFollowingParameters = "And accept the following parameters";
        }
Esempio n. 4
0
 public void Can_read_xml_doc()
 {
     var doc = new HelpXmlDocumentation().GetSummariesFromText (File.ReadAllText("Tests.xml"));
     Assert.That(doc["P:Isop.Tests.FakeConfigurations.FullConfiguration.Global"],Is.EqualTo("GLOBAL!!"));
 }
Esempio n. 5
0
 [Test] public void Can_get_same_key_as_in_xmldoc()
 {
     var helpXml = new HelpXmlDocumentation();
     var _global = typeof(FullConfiguration).GetMethods().MatchGet("Global");
     Assert.That(helpXml.GetKey(_global.MethodInfo), Is.EqualTo("P:Isop.Tests.FakeConfigurations.FullConfiguration.Global"));
     var action1 = typeof(DescriptionWithCommentsController).GetMethods().Match(name:"Action1");
     Assert.That(helpXml.GetKey(action1), Is.EqualTo("M:Isop.Tests.FakeControllers.DescriptionWithCommentsController.Action1"));
     
 }
 public ConfigureUsingInstance(Configuration configuration, HelpXmlDocumentation helpXmlDocumentation)
 {
     _configuration = configuration;
     this.helpXmlDocumentation = helpXmlDocumentation;
 }