mirror of https://github.com/AMT-Cheif/Stylet.git
Stylistic changes
This commit is contained in:
parent
22066de5c8
commit
bcb821bcbd
|
@ -95,12 +95,8 @@ namespace Stylet
|
|||
lock (this.handlersLock)
|
||||
{
|
||||
var existingHandler = this.handlers.FirstOrDefault(x => x.IsHandlerForInstance(handler));
|
||||
if (existingHandler != null)
|
||||
{
|
||||
if (existingHandler.UnsubscribeFromChannels(channels)) // Handles default topic appropriately
|
||||
this.handlers.Remove(existingHandler);
|
||||
}
|
||||
|
||||
if (existingHandler != null && existingHandler.UnsubscribeFromChannels(channels)) // Handles default topic appropriately
|
||||
this.handlers.Remove(existingHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,10 @@ namespace Stylet
|
|||
/// <returns>true if the current object is equal to the other parameter; otherwise, false.</returns>
|
||||
public bool Equals(LabelledValue<T> other)
|
||||
{
|
||||
return other == null ? false : this.Label == other.Label && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
|
||||
if (other == null)
|
||||
return false;
|
||||
|
||||
return this.Label == other.Label && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -61,9 +61,7 @@ namespace Stylet
|
|||
{
|
||||
INotifyPropertyChanged inpc;
|
||||
if (this.inpc.TryGetTarget(out inpc))
|
||||
{
|
||||
inpc.PropertyChanged -= handler;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace Stylet
|
|||
window.StateChanged += WindowStateChanged;
|
||||
}
|
||||
|
||||
void WindowStateChanged(object sender, EventArgs e)
|
||||
private void WindowStateChanged(object sender, EventArgs e)
|
||||
{
|
||||
switch (this.window.WindowState)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue