コード例 #1
0
 public void ShowInProjectView(ModelEntity entity)
 {
     entity.Match <ModelEntity, object>()
     .Case <ModelEntity.Element>(e => e.EaObject)
     .GetOrNone()
     .Do(e => Repo.Val.ShowInProjectView(e));
 }
コード例 #2
0
 public void PropagateChanges(ModelEntity entity)
 {
     entity.Match <ModelEntity, Unit>()
     .Case <ModelEntity.Element>(e =>
     {
         Repo.Val.AdviseElementChange(e.Id);
         return(Unit.Instance);
     })
     .Case <ModelEntity.Package>(p =>
     {
         p.AssociatedElement.Do(e => Repo.Val.AdviseElementChange(e.Id));
         return(Unit.Instance);
     })
     .Case <ModelEntity.Connector>(c =>
     {
         Repo.Val.AdviseConnectorChange(c.Id);
         return(Unit.Instance);
     });
 }