private static CallSiteKind GetCallSiteKind( AddParameterDialogViewModel addParameterViewModel ) { if (addParameterViewModel.IsCallsiteInferred) { return(CallSiteKind.Inferred); } if (addParameterViewModel.IsCallsiteOmitted) { return(CallSiteKind.Omitted); } if (addParameterViewModel.IsCallsiteTodo) { return(CallSiteKind.Todo); } Debug.Assert(addParameterViewModel.IsCallsiteRegularValue); return(addParameterViewModel.UseNamedArguments ? CallSiteKind.ValueWithName : CallSiteKind.Value); }
public AddParameterDialog(AddParameterDialogViewModel viewModel) { _viewModel = viewModel; this.Loaded += AddParameterDialog_Loaded; DataContext = _viewModel; InitializeComponent(); }
public AddParameterDialog(AddParameterDialogViewModel viewModel) { // The current implementation supports Add only. // The dialog should be initialized the other way if called for Edit. _viewModel = viewModel; _document = viewModel.Document; this.Loaded += AddParameterDialog_Loaded; DataContext = _viewModel; InitializeComponent(); }