本文整理匯總了C#中libsbmlcs.SBMLNamespaces.getVersion方法的典型用法代碼示例。如果您正苦於以下問題:C# SBMLNamespaces.getVersion方法的具體用法?C# SBMLNamespaces.getVersion怎麽用?C# SBMLNamespaces.getVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libsbmlcs.SBMLNamespaces
的用法示例。
在下文中一共展示了SBMLNamespaces.getVersion方法的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;
}