コード例 #1
0
        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);
        }
コード例 #2
0
        public AddParameterDialog(AddParameterDialogViewModel viewModel)
        {
            _viewModel   = viewModel;
            this.Loaded += AddParameterDialog_Loaded;
            DataContext  = _viewModel;

            InitializeComponent();
        }
コード例 #3
0
        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();
        }