示例#1
0
 public void AddStartPoint(ActivitiesLink activitiesLink){
     _startPoints.Add(activitiesLink);
 }
示例#2
0
 private Dictionary<string, BaseActivity> LoadLinksAndActivities(string fileName){
     var activities = new Dictionary<string, BaseActivity>();
     var activitiesLink = new ActivitiesLink();
     using (var reader = new XmlTextReader(fileName)) {
         reader.WhitespaceHandling = WhitespaceHandling.None;
         while (reader.Read()){
             if (reader.NodeType == XmlNodeType.Element){
                 if (reader.Name == LINK_NODE){
                     activitiesLink = new ActivitiesLink();
                     _activitiesController.ActivitiesLinks.Add(activitiesLink);
                 }
                 else if (reader.Name == SOURCE_ATTRIBUTE){
                     var activityId = reader.GetAttribute(ActivityFactoryBase.ID_ATTRIBUTE);
                     activitiesLink.SourceActivity = new NullActivity(){ID = activityId};
                 }
                 else if (reader.Name == ACTIVITY_NODE){
                     var targetActivity = CreateActivityByKey(reader);
                     activities.Add(targetActivity.ID, targetActivity);
                     activitiesLink.TargetActivity = targetActivity;
                 }
             }
         }
     }
     return activities;
 }
示例#3
0
 public ActivitiesController(IServiceProvider serviceProvider){
     _serviceProvider = serviceProvider;
     ActivityLinksGrid = new ActivitiesLink[_columnCount, _rowCount];
 }