當前位置: 首頁>>代碼示例>>C#>>正文


C# Event.setId方法代碼示例

本文整理匯總了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);
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:19,代碼來源:TestModel.cs

示例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;
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:19,代碼來源:TestEvent.cs

示例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;
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:11,代碼來源:TestCopyAndClone.cs

示例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;
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:11,代碼來源:TestCopyAndClone.cs

示例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;
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:12,代碼來源:TestCopyAndClone.cs


注:本文中的libsbmlcs.Event.setId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。