Stylistic changes

This commit is contained in:
Antony Male 2014-11-29 18:11:13 +00:00
parent 22066de5c8
commit bcb821bcbd
4 changed files with 7 additions and 10 deletions

View File

@ -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);
}
}

View File

@ -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>

View File

@ -61,9 +61,7 @@ namespace Stylet
{
INotifyPropertyChanged inpc;
if (this.inpc.TryGetTarget(out inpc))
{
inpc.PropertyChanged -= handler;
}
}
}

View File

@ -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)
{