summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Utilities
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-03-26 11:57:57 +0100
committersr55 <[email protected]>2017-03-26 11:57:57 +0100
commit6402bd62a09790377fa76868bed361ffa9b5c810 (patch)
tree99629d78f89f4dac2fca036e0e85cdbadb4f6f8e /win/CS/HandBrakeWPF/Utilities
parentb13c230613ae2092a5ce6f699df10a93f400cff6 (diff)
WinGui: Fix a number of stylecop warnings.
Diffstat (limited to 'win/CS/HandBrakeWPF/Utilities')
-rw-r--r--win/CS/HandBrakeWPF/Utilities/Execute.cs42
-rw-r--r--win/CS/HandBrakeWPF/Utilities/PropertyChangedBase.cs26
2 files changed, 34 insertions, 34 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/Execute.cs b/win/CS/HandBrakeWPF/Utilities/Execute.cs
index 34fdf3a44..0282744f3 100644
--- a/win/CS/HandBrakeWPF/Utilities/Execute.cs
+++ b/win/CS/HandBrakeWPF/Utilities/Execute.cs
@@ -73,18 +73,6 @@ namespace HandBrakeWPF.Utilities
}
/// <summary>
- /// The validate dispatcher.
- /// </summary>
- /// <exception cref="InvalidOperationException">
- /// Not initialized with dispatcher.
- /// </exception>
- private static void ValidateDispatcher()
- {
- if (Execute.dispatcher == null)
- throw new InvalidOperationException("Not initialized with dispatcher.");
- }
-
- /// <summary>
/// Executes the action on the UI thread asynchronously.
/// </summary>
/// <param name="action">The action to execute.</param>
@@ -124,6 +112,20 @@ namespace HandBrakeWPF.Utilities
}
/// <summary>
+ /// Executes the action on the UI thread.
+ /// </summary>
+ /// <param name="action">The action to execute.</param>
+ public static void OnUIThread(this System.Action action)
+ {
+ if (Execute.executor != null)
+ Execute.executor(action);
+ else if (Execute.CheckAccess())
+ action();
+ else
+ Execute.OnUIThreadAsync(action).Wait();
+ }
+
+ /// <summary>
/// The check access.
/// </summary>
/// <returns>
@@ -137,17 +139,15 @@ namespace HandBrakeWPF.Utilities
}
/// <summary>
- /// Executes the action on the UI thread.
+ /// The validate dispatcher.
/// </summary>
- /// <param name="action">The action to execute.</param>
- public static void OnUIThread(this System.Action action)
+ /// <exception cref="InvalidOperationException">
+ /// Not initialized with dispatcher.
+ /// </exception>
+ private static void ValidateDispatcher()
{
- if (Execute.executor != null)
- Execute.executor(action);
- else if (Execute.CheckAccess())
- action();
- else
- Execute.OnUIThreadAsync(action).Wait();
+ if (Execute.dispatcher == null)
+ throw new InvalidOperationException("Not initialized with dispatcher.");
}
}
}
diff --git a/win/CS/HandBrakeWPF/Utilities/PropertyChangedBase.cs b/win/CS/HandBrakeWPF/Utilities/PropertyChangedBase.cs
index ae3a401b2..08f206891 100644
--- a/win/CS/HandBrakeWPF/Utilities/PropertyChangedBase.cs
+++ b/win/CS/HandBrakeWPF/Utilities/PropertyChangedBase.cs
@@ -85,19 +85,6 @@ namespace HandBrakeWPF.Utilities
}
/// <summary>
- /// Raises the <see cref="E:PropertyChanged"/> event directly.
- /// </summary>
- /// <param name="e">The <see cref="T:System.ComponentModel.PropertyChangedEventArgs"/> instance containing the event data.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected void OnPropertyChanged(PropertyChangedEventArgs e)
- {
- PropertyChangedEventHandler changedEventHandler = this.PropertyChanged;
- if (changedEventHandler == null)
- return;
- changedEventHandler((object)this, e);
- }
-
- /// <summary>
/// Called when the object is deserialized.
/// </summary>
/// <param name="c">The streaming context.</param>
@@ -117,5 +104,18 @@ namespace HandBrakeWPF.Utilities
{
return false;
}
+
+ /// <summary>
+ /// Raises the <see cref="E:PropertyChanged"/> event directly.
+ /// </summary>
+ /// <param name="e">The <see cref="T:System.ComponentModel.PropertyChangedEventArgs"/> instance containing the event data.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected void OnPropertyChanged(PropertyChangedEventArgs e)
+ {
+ PropertyChangedEventHandler changedEventHandler = this.PropertyChanged;
+ if (changedEventHandler == null)
+ return;
+ changedEventHandler((object)this, e);
+ }
}
}