本文整理汇总了C#中libsbmlcs.Event.setId方法的典型用法代码示例。如果您正苦于以下问题:C# Event.setId方法的具体用法?C# Event.setId怎么用?C# Event.setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.Event
的用法示例。
在下文中一共展示了Event.setId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_Model_getEventById
public void test_Model_getEventById()
{
Event e1 = new Event(2,4);
Event e2 = new Event(2,4);
Trigger t = new Trigger(2,4);
t.setMath(libsbml.parseFormula("true"));
e1.setTrigger(t);
e2.setTrigger(t);
e1.createEventAssignment();
e2.createEventAssignment();
e1.setId( "e1" );
e2.setId( "e2" );
M.addEvent(e1);
M.addEvent(e2);
assertTrue( M.getNumEvents() == 2 );
assertNotEquals(M.getEvent( "e1" ),e1);
assertNotEquals(M.getEvent( "e2" ),e2);
assertEquals(M.getEvent( "e3" ),null);
}
示例2: test_Event_full
public void test_Event_full()
{
ASTNode math1 = libsbml.parseFormula("0");
Trigger trigger = new Trigger(2,4);
ASTNode math = libsbml.parseFormula("0");
Event e = new Event(2,4);
EventAssignment ea = new EventAssignment(2,4);
ea.setVariable( "k");
ea.setMath(math);
trigger.setMath(math1);
e.setTrigger(trigger);
e.setId( "e1");
e.setName( "Set k2 to zero when P1 <= t");
e.addEventAssignment(ea);
assertTrue( e.getNumEventAssignments() == 1 );
assertNotEquals(e.getEventAssignment(0),ea);
math = null;
e = null;
}
示例3: test_Event_copyConstructor
public void test_Event_copyConstructor()
{
Event o1 = new Event(2,4);
o1.setId("c");
assertTrue( o1.getId() == "c" );
Event o2 = new Event(o1);
assertTrue( o2.getId() == "c" );
assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
o2 = null;
o1 = null;
}
示例4: test_Event_clone
public void test_Event_clone()
{
Event o1 = new Event(2,4);
o1.setId("c");
assertTrue( o1.getId() == "c" );
Event o2 = o1.clone();
assertTrue( o2.getId() == "c" );
assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
o2 = null;
o1 = null;
}
示例5: test_Event_assignmentOperator
public void test_Event_assignmentOperator()
{
Event o1 = new Event(2,4);
o1.setId("c");
assertTrue( o1.getId() == "c" );
Event o2 = new Event(2,4);
o2 = o1;
assertTrue( o2.getId() == "c" );
assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
o2 = null;
o1 = null;
}