Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2793 for trunk/sources


Ignore:
Timestamp:
02/14/10 01:57:07 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • replaced new EventArgs() by EventArgs.Empty
Location:
trunk/sources
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Common/3.2/NotificationDictionary.cs

    r2790 r2793  
    4848    protected virtual void OnBeforeInsert() {
    4949      if (BeforeInsertEvent != null)
    50         BeforeInsertEvent(this, new EventArgs());
     50        BeforeInsertEvent(this, EventArgs.Empty);
    5151    }
    5252
    5353    protected virtual void OnAfterInsert() {
    5454      if (AfterInsertEvent != null)
    55         AfterInsertEvent(this, new EventArgs());
     55        AfterInsertEvent(this, EventArgs.Empty);
    5656    }
    5757
    5858    protected virtual void OnBeforeRemove() {
    5959      if (BeforeRemoveEvent != null)
    60         BeforeRemoveEvent(this, new EventArgs());
     60        BeforeRemoveEvent(this, EventArgs.Empty);
    6161    }
    6262
    6363    protected virtual void OnAfterRemove() {
    6464      if (AfterRemoveEvent != null)
    65         AfterRemoveEvent(this, new EventArgs());
     65        AfterRemoveEvent(this, EventArgs.Empty);
    6666    }
    6767
    6868    protected virtual void OnChange() {
    6969      if (ChangeEvent != null)
    70         ChangeEvent(this, new EventArgs());
     70        ChangeEvent(this, EventArgs.Empty);
    7171    }
    7272
    7373    protected virtual void OnClear() {
    7474      if (ClearEvent != null)
    75         ClearEvent(this, new EventArgs());
     75        ClearEvent(this, EventArgs.Empty);
    7676    }
    7777
  • trunk/sources/HeuristicLab.Core/3.3/Engine.cs

    r2790 r2793  
    242242    protected virtual void OnExecutionTimeChanged() {
    243243      if (ExecutionTimeChanged != null)
    244         ExecutionTimeChanged(this, new EventArgs());
     244        ExecutionTimeChanged(this, EventArgs.Empty);
    245245    }
    246246    /// <summary>
     
    253253    protected virtual void OnPrepared() {
    254254      if (Prepared != null)
    255         Prepared(this, new EventArgs());
     255        Prepared(this, EventArgs.Empty);
    256256    }
    257257    /// <summary>
     
    264264    protected virtual void OnStarted() {
    265265      if (Started != null)
    266         Started(this, new EventArgs());
     266        Started(this, EventArgs.Empty);
    267267    }
    268268    /// <summary>
     
    275275    protected virtual void OnStopped() {
    276276      if (Stopped != null)
    277         Stopped(this, new EventArgs());
     277        Stopped(this, EventArgs.Empty);
    278278    }
    279279    /// <summary>
  • trunk/sources/HeuristicLab.Core/3.3/NamedItem.cs

    r2790 r2793  
    131131    protected virtual void OnNameChanged() {
    132132      if (NameChanged != null)
    133         NameChanged(this, new EventArgs());
     133        NameChanged(this, EventArgs.Empty);
    134134      OnChanged();
    135135    }
     
    142142    protected virtual void OnDescriptionChanged() {
    143143      if (DescriptionChanged != null)
    144         DescriptionChanged(this, new EventArgs());
     144        DescriptionChanged(this, EventArgs.Empty);
    145145      OnChanged();
    146146    }
  • trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs

    r2790 r2793  
    9797    protected virtual void OnInitialOperatorChanged() {
    9898      if (InitialOperatorChanged != null)
    99         InitialOperatorChanged(this, new EventArgs());
     99        InitialOperatorChanged(this, EventArgs.Empty);
    100100      OnChanged();
    101101    }
  • trunk/sources/HeuristicLab.Core/3.3/Variable.cs

    r2790 r2793  
    101101    private void OnValueChanged() {
    102102      if (ValueChanged != null)
    103         ValueChanged(this, new EventArgs());
     103        ValueChanged(this, EventArgs.Empty);
    104104      OnChanged();
    105105    }
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ActionUserInterfaceItem.cs

    r2790 r2793  
    3636          this.toolStripItem = value;
    3737          if (firstTimeSet)
    38             this.OnToolStripItemSet(new EventArgs());
     38            this.OnToolStripItemSet(EventArgs.Empty);
    3939        }
    4040      }
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainForm.cs

    r2790 r2793  
    110110        Invoke((MethodInvoker)OnActiveViewChanged);
    111111      else if (ActiveViewChanged != null)
    112         ActiveViewChanged(this, new EventArgs());
     112        ActiveViewChanged(this, EventArgs.Empty);
    113113    }
    114114
     
    142142        Invoke((MethodInvoker)FireMainFormChanged);
    143143      else if (Changed != null)
    144         Changed(this, new EventArgs());
     144        Changed(this, EventArgs.Empty);
    145145    }
    146146
     
    150150        if (!this.initialized) {
    151151          this.initialized = true;
    152           this.OnInitialized(new EventArgs());
     152          this.OnInitialized(EventArgs.Empty);
    153153        }
    154154        this.CreateGUI();
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs

    r2790 r2793  
    9696      this.IsShown = false;
    9797      MainFormManager.GetMainForm<MainForm>().HideView(this);
    98       this.OnHidden(new EventArgs());
     98      this.OnHidden(EventArgs.Empty);
    9999    }
    100100
     
    102102    protected virtual void OnCaptionChanged() {
    103103      if (CaptionChanged != null)
    104         CaptionChanged(this, new EventArgs());
     104        CaptionChanged(this, EventArgs.Empty);
    105105    }
    106106
     
    110110        Invoke((MethodInvoker)OnChanged);
    111111      else if (Changed != null)
    112         Changed(this, new EventArgs());
     112        Changed(this, EventArgs.Empty);
    113113    }
    114114
  • trunk/sources/HeuristicLab.Operators/3.3/Operator.cs

    r2790 r2793  
    167167    protected virtual void OnBreakpointChanged() {
    168168      if (BreakpointChanged != null) {
    169         BreakpointChanged(this, new EventArgs());
     169        BreakpointChanged(this, EventArgs.Empty);
    170170      }
    171171      OnChanged();
     
    178178    protected virtual void OnExecuted() {
    179179      if (Executed != null) {
    180         Executed(this, new EventArgs());
     180        Executed(this, EventArgs.Empty);
    181181      }
    182182    }
  • trunk/sources/HeuristicLab.Parameters/3.3/LookupParameter.cs

    r2790 r2793  
    152152    private void OnActualNameChanged() {
    153153      if (ActualNameChanged != null)
    154         ActualNameChanged(this, new EventArgs());
     154        ActualNameChanged(this, EventArgs.Empty);
    155155      OnChanged();
    156156    }
  • trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs

    r2790 r2793  
    119119    private void OnActualNameChanged() {
    120120      if (ActualNameChanged != null)
    121         ActualNameChanged(this, new EventArgs());
     121        ActualNameChanged(this, EventArgs.Empty);
    122122      OnChanged();
    123123    }
  • trunk/sources/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs

    r2790 r2793  
    7979    private void OnValueChanged() {
    8080      if (ValueChanged != null)
    81         ValueChanged(this, new EventArgs());
     81        ValueChanged(this, EventArgs.Empty);
    8282      OnChanged();
    8383    }
  • trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs

    r2790 r2793  
    9696    private void OnValueChanged() {
    9797      if (ValueChanged != null)
    98         ValueChanged(this, new EventArgs());
     98        ValueChanged(this, EventArgs.Empty);
    9999      OnChanged();
    100100    }
Note: See TracChangeset for help on using the changeset viewer.