当前位置: 首页>>代码示例>>C#>>正文


C# XMLNamespaces.add方法代码示例

本文整理汇总了C#中libsbmlcs.XMLNamespaces.add方法的典型用法代码示例。如果您正苦于以下问题:C# XMLNamespaces.add方法的具体用法?C# XMLNamespaces.add怎么用?C# XMLNamespaces.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libsbmlcs.XMLNamespaces的用法示例。


在下文中一共展示了XMLNamespaces.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: test_L3_LocalParameter_createWithNS

 public void test_L3_LocalParameter_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       LocalParameter p = new  LocalParameter(sbmlns);
       assertTrue( p.getTypeCode() == libsbml.SBML_LOCAL_PARAMETER );
       assertTrue( p.getMetaId() == "" );
       assertTrue( p.getNotes() == null );
       assertTrue( p.getAnnotation() == null );
       assertTrue( p.getLevel() == 3 );
       assertTrue( p.getVersion() == 1 );
       assertTrue( p.getNamespaces() != null );
       assertTrue( p.getNamespaces().getLength() == 2 );
       assertTrue( p.getId() == "" );
       assertTrue( p.getName() == "" );
       assertTrue( p.getUnits() == "" );
       assertEquals( true, double.IsNaN(p.getValue()) );
       assertEquals( false, p.isSetId() );
       assertEquals( false, p.isSetName() );
       assertEquals( false, p.isSetValue() );
       assertEquals( false, p.isSetUnits() );
       p = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:25,代码来源:TestL3LocalParameter.cs

示例2: test_Constraint_createWithNS

 public void test_Constraint_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,2);
       sbmlns.addNamespaces(xmlns);
       Constraint object1 = new  Constraint(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_CONSTRAINT );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 2 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestConstraint.cs

示例3: test_Delay_createWithNS

 public void test_Delay_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       Delay object1 = new  Delay(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_DELAY );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestDelay.cs

示例4: test_StoichiometryMath_createWithNS

 public void test_StoichiometryMath_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       StoichiometryMath object1 = new  StoichiometryMath(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_STOICHIOMETRY_MATH );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestStoichiometryMath.cs

示例5: test_EventAssignment_createWithNS

 public void test_EventAssignment_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       EventAssignment object1 = new  EventAssignment(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_EVENT_ASSIGNMENT );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestEventAssignment.cs

示例6: test_SpeciesType_createWithNS

 public void test_SpeciesType_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,2);
       sbmlns.addNamespaces(xmlns);
       SpeciesType object1 = new  SpeciesType(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_SPECIES_TYPE );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 2 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestSpeciesType.cs

示例7: test_ModifierSpeciesReference_createWithNS

 public void test_ModifierSpeciesReference_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       SBase object1 = new  ModifierSpeciesReference(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_MODIFIER_SPECIES_REFERENCE );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       XMLNamespaces n = object1.getNamespaces();
       assertTrue( n.getLength() == 2 );
       object1 = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestModifierSpeciesReference.cs

示例8: test_SyntaxChecker_validXHTML

 public void test_SyntaxChecker_validXHTML()
 {
     SBMLNamespaces NS24 = new  SBMLNamespaces(2,4);
       SBMLNamespaces NS31 = new  SBMLNamespaces(3,1);
       XMLToken toptoken;
       XMLNode topnode;
       XMLTriple toptriple = new  XMLTriple("notes", "", "");
       XMLToken token;
       XMLNode node;
       XMLTriple triple = new  XMLTriple("p", "", "");
       XMLAttributes att = new  XMLAttributes();
       XMLNamespaces ns = new  XMLNamespaces();
       ns.add( "http://www.w3.org/1999/xhtml", "");
       XMLToken tt = new  XMLToken("This is my text");
       XMLNode n1 = new XMLNode(tt);
       toptoken = new  XMLToken(toptriple,att);
       topnode = new XMLNode(toptoken);
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == true );
       triple = new  XMLTriple("html", "", "");
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.removeChild(0);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == true );
       triple = new  XMLTriple("html", "", "");
       ns.clear();
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.removeChild(0);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == false );
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:44,代码来源:TestSyntaxChecker.cs

示例9: test_L3_Event_createWithNS

 public void test_L3_Event_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Event e = new  Event(sbmlns);
       assertTrue( e.getTypeCode() == libsbml.SBML_EVENT );
       assertTrue( e.getMetaId() == "" );
       assertTrue( e.getNotes() == null );
       assertTrue( e.getAnnotation() == null );
       assertTrue( e.getLevel() == 3 );
       assertTrue( e.getVersion() == 1 );
       assertTrue( e.getNamespaces() != null );
       assertTrue( e.getNamespaces().getLength() == 2 );
       assertTrue( e.getId() == "" );
       assertTrue( e.getName() == "" );
       assertTrue( e.getUseValuesFromTriggerTime() == true );
       assertEquals( false, e.isSetId() );
       assertEquals( false, e.isSetName() );
       assertEquals( false, e.isSetUseValuesFromTriggerTime() );
       e = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:23,代码来源:TestL3Event.cs

示例10: test_SBase_appendAnnotation

 public void test_SBase_appendAnnotation()
 {
     XMLToken token;
       XMLNode node;
       XMLToken token1;
       XMLNode node1;
       XMLToken token_top;
       XMLNode node_top;
       XMLTriple triple = new XMLTriple("any", "", "pr");
       XMLAttributes att = new XMLAttributes();
       XMLNamespaces ns = new XMLNamespaces();
       ns.add("http://www.any", "pr");
       XMLToken token_top1;
       XMLNode node_top1;
       XMLTriple triple1 = new XMLTriple("anyOther", "", "prOther");
       XMLNamespaces ns1 = new XMLNamespaces();
       ns1.add("http://www.any.other", "prOther");
       token = new XMLToken("This is a test note");
       node = new XMLNode(token);
       token1 = new  XMLToken("This is additional");
       node1 = new XMLNode(token1);
       token_top = new XMLToken(triple, att, ns);
       node_top = new XMLNode(token_top);
       node_top.addChild(node);
       token_top1 = new XMLToken(triple1, att, ns1);
       node_top1 = new XMLNode(token_top1);
       node_top1.addChild(node1);
       int i = S.setAnnotation(node_top);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       i = S.appendAnnotation(node_top1);
       XMLNode t1 = S.getAnnotation();
       assertTrue( t1.getNumChildren() == 2 );
       assertTrue((     "This is a test note" == t1.getChild(0).getChild(0).getCharacters() ));
       assertTrue((     "This is additional" == t1.getChild(1).getChild(0).getCharacters() ));
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:35,代码来源:TestSBase_newSetters.cs

示例11: test_L3_Reaction_createWithNS

 public void test_L3_Reaction_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Reaction r = new  Reaction(sbmlns);
       assertTrue( r.getTypeCode() == libsbml.SBML_REACTION );
       assertTrue( r.getMetaId() == "" );
       assertTrue( r.getNotes() == null );
       assertTrue( r.getAnnotation() == null );
       assertTrue( r.getLevel() == 3 );
       assertTrue( r.getVersion() == 1 );
       assertTrue( r.getNamespaces() != null );
       assertTrue( r.getNamespaces().getLength() == 2 );
       assertTrue( r.getId() == "" );
       assertTrue( r.getName() == "" );
       assertTrue( r.getCompartment() == "" );
       assertTrue( r.getFast() == false );
       assertTrue( r.getReversible() == true );
       assertEquals( false, r.isSetId() );
       assertEquals( false, r.isSetName() );
       assertEquals( false, r.isSetCompartment() );
       assertEquals( false, r.isSetFast() );
       assertEquals( false, r.isSetReversible() );
       r = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:27,代码来源:TestL3Reaction.cs

示例12: test_SBase_appendNotes

 public void test_SBase_appendNotes()
 {
     XMLToken token;
       XMLNode node;
       XMLToken token1;
       XMLNode node1;
       XMLNode node2;
       XMLTriple triple = new  XMLTriple("p", "", "");
       XMLAttributes att = new  XMLAttributes();
       XMLNamespaces ns = new  XMLNamespaces();
       ns.add( "http://www.w3.org/1999/xhtml", "");
       XMLToken token4 = new  XMLToken("This is my text");
       XMLNode node4 = new XMLNode(token4);
       XMLToken token5 = new  XMLToken("This is additional text");
       XMLNode node5 = new XMLNode(token5);
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(node4);
       int i = S.setNotes(node);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( S.isSetNotes() == true );
       token1 = new  XMLToken(triple,att,ns);
       node1 = new XMLNode(token1);
       node1.addChild(node5);
       i = S.appendNotes(node1);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( S.isSetNotes() == true );
       node2 = S.getNotes();
       assertTrue( node2.getNumChildren() == 2 );
       assertTrue((  "p" == node2.getChild(0).getName() ));
       assertTrue( node2.getChild(0).getNumChildren() == 1 );
       assertTrue((  "p" == node2.getChild(1).getName() ));
       assertTrue( node2.getChild(1).getNumChildren() == 1 );
       string chars1 = node2.getChild(0).getChild(0).getCharacters();
       string chars2 = node2.getChild(1).getChild(0).getCharacters();
       assertTrue((  "This is my text" == chars1 ));
       assertTrue((  "This is additional text" == chars2 ));
       node = null;
       node1 = null;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:40,代码来源:TestSBase_newSetters.cs

示例13: test_SBase_appendNotes8

 public void test_SBase_appendNotes8()
 {
     XMLAttributes att = new  XMLAttributes();
       XMLNamespaces ns = new  XMLNamespaces();
       ns.add( "http://www.w3.org/1999/xhtml", "");
       XMLTriple body_triple = new  XMLTriple("body", "", "");
       XMLTriple p_triple = new  XMLTriple("p", "", "");
       XMLToken body_token = new  XMLToken(body_triple,att,ns);
       XMLToken p_token = new  XMLToken(p_triple,att);
       XMLToken text_token = new  XMLToken("This is my text");
       XMLNode body_node = new XMLNode(body_token);
       XMLNode p_node = new XMLNode(p_token);
       XMLNode text_node = new XMLNode(text_token);
       XMLToken p_token1 = new  XMLToken(p_triple,att,ns);
       XMLToken text_token1 = new  XMLToken("This is more text");
       XMLNode p_node1 = new XMLNode(p_token1);
       XMLNode text_node1 = new XMLNode(text_token1);
       XMLNode notes;
       XMLNode child, child1;
       p_node.addChild(text_node);
       body_node.addChild(p_node);
       p_node1.addChild(text_node1);
       int i = S.setNotes(body_node);
       i = S.appendNotes(p_node1);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       notes = S.getNotes();
       assertTrue((  "notes" == notes.getName() ));
       assertTrue( notes.getNumChildren() == 1 );
       child = notes.getChild(0);
       assertTrue((  "body" == child.getName() ));
       assertTrue( child.getNumChildren() == 2 );
       child1 = child.getChild(0);
       assertTrue((  "p" == child1.getName() ));
       assertTrue( child1.getNumChildren() == 1 );
       child1 = child1.getChild(0);
       assertTrue((  "This is my text" == child1.getCharacters() ));
       assertTrue( child1.getNumChildren() == 0 );
       child1 = child.getChild(1);
       assertTrue((  "p" == child1.getName() ));
       assertTrue( child1.getNumChildren() == 1 );
       child1 = child1.getChild(0);
       assertTrue((  "This is more text" == child1.getCharacters() ));
       assertTrue( child1.getNumChildren() == 0 );
       att = null;
       ns = null;
       body_triple = null;
       p_triple = null;
       body_token = null;
       p_token = null;
       text_token = null;
       text_token1 = null;
       p_token1 = null;
       body_node = null;
       p_node = null;
       text_node = null;
       p_node1 = null;
       text_node1 = null;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:58,代码来源:TestSBase_newSetters.cs

示例14: test_FunctionDefinition_createWithNS

 public void test_FunctionDefinition_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       FunctionDefinition object1 = new  FunctionDefinition(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_FUNCTION_DEFINITION );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestFunctionDefinition.cs

示例15: test_SBase_appendAnnotationString

 public void test_SBase_appendAnnotationString()
 {
     XMLToken token;
       XMLNode node;
       token = new  XMLToken("This is a test note");
       node = new XMLNode(token);
       XMLToken token_top;
       XMLNode node_top;
       XMLTriple triple = new XMLTriple("any", "", "pr");
       XMLAttributes att = new XMLAttributes();
       XMLNamespaces ns = new XMLNamespaces();
       ns.add("http://www.any", "pr");
       token_top = new XMLToken(triple, att, ns);
       node_top = new XMLNode(token_top);
       node_top.addChild(node);
       int i = S.setAnnotation(node_top);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       i = S.appendAnnotation("<prA:other xmlns:prA=\"http://some\">This is additional</prA:other>");
       XMLNode t1 = S.getAnnotation();
       assertTrue( t1.getNumChildren() == 2 );
       assertTrue((     "This is a test note" == t1.getChild(0).getChild(0).getCharacters() ));
       XMLNode c1 = t1.getChild(1);
       assertTrue( c1.getNumChildren() == 1 );
       assertTrue((  "This is additional" == c1.getChild(0).getCharacters() ));
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:25,代码来源:TestSBase_newSetters.cs


注:本文中的libsbmlcs.XMLNamespaces.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。