本文整理汇总了C#中libsbmlcs.SBMLNamespaces.getLevel方法的典型用法代码示例。如果您正苦于以下问题:C# SBMLNamespaces.getLevel方法的具体用法?C# SBMLNamespaces.getLevel怎么用?C# SBMLNamespaces.getLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.SBMLNamespaces
的用法示例。
在下文中一共展示了SBMLNamespaces.getLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_SBMLNamespaces_add_and_remove_namespaces
public void test_SBMLNamespaces_add_and_remove_namespaces()
{
SBMLNamespaces sbmlns = new SBMLNamespaces ( 3,1 );
assertTrue( sbmlns.getLevel() == 3 );
assertTrue( sbmlns.getVersion() == 1 );
sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/group/version1", "group");
sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/layout/version1", "layout");
sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/render/version1", "render");
sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/multi/version1", "multi");
XMLNamespaces ns = sbmlns.getNamespaces();
assertTrue( ns.getLength() == 5 );
assertTrue( ns.getURI(0) == "http://www.sbml.org/sbml/level3/version1/core" );
assertTrue( ns.getPrefix(0) == "" );
assertTrue( ns.getURI(1) == "http://www.sbml.org/sbml/level3/version1/group/version1" );
assertTrue( ns.getPrefix(1) == "group" );
assertTrue( ns.getURI(2) == "http://www.sbml.org/sbml/level3/version1/layout/version1" );
assertTrue( ns.getPrefix(2) == "layout" );
assertTrue( ns.getURI(3) == "http://www.sbml.org/sbml/level3/version1/render/version1" );
assertTrue( ns.getPrefix(3) == "render" );
assertTrue( ns.getURI(4) == "http://www.sbml.org/sbml/level3/version1/multi/version1" );
assertTrue( ns.getPrefix(4) == "multi" );
sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/layout/version1");
sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/group/version1");
sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/render/version1");
sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/multi/version1");
}
示例2: test_SBMLNamespaces_L1V1
public void test_SBMLNamespaces_L1V1()
{
SBMLNamespaces sbml = new SBMLNamespaces(1,1);
assertTrue( sbml.getLevel() == 1 );
assertTrue( sbml.getVersion() == 1 );
XMLNamespaces ns = sbml.getNamespaces();
assertTrue( ns.getLength() == 1 );
assertTrue( ns.getURI(0) == "http://www.sbml.org/sbml/level1" );
assertTrue( ns.getPrefix(0) == "" );
sbml = null;
}