Created
November 5, 2012 04:54
-
-
Save gshackles/4015415 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class SubViewModelBase<TResult> : ViewModelBase | |
{ | |
protected string MessageId { get; private set; } | |
protected SubViewModelBase(string messageId) | |
{ | |
MessageId = messageId; | |
} | |
protected void Cancel() | |
{ | |
ReturnResult(default(TResult)); | |
} | |
protected void ReturnResult(TResult result) | |
{ | |
var message = new SubNavigationResultMessage<TResult>(this, MessageId, result); | |
MessengerHub.Publish(message); | |
Close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment