Skip to content

Commit

Permalink
Validate arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Feb 6, 2013
1 parent 26cc9a2 commit 22a009e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Diff/ViewModel/DiffMarginViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ public class DiffMarginViewModel : ViewModelBase

public DiffMarginViewModel(DiffMargin margin, IWpfTextView textView, ITextDocumentFactoryService textDocumentFactoryService, IGitCommands gitCommands)
{
if (margin == null)
throw new ArgumentNullException("margin");
if (textView == null)
throw new ArgumentNullException("textView");
if (textDocumentFactoryService == null)
throw new ArgumentNullException("textDocumentFactoryService");
if (gitCommands == null)
throw new ArgumentNullException("gitCommands");

_margin = margin;
_textView = textView;
_gitCommands = gitCommands;
Expand Down

0 comments on commit 22a009e

Please sign in to comment.