public ChangeSignatureOptionsResult?GetChangeSignatureOptions( Document document, int positionForTypeBinding, ISymbol symbol, ParameterConfiguration parameters) { this.AssertIsForeground(); var viewModel = new ChangeSignatureDialogViewModel( parameters, symbol, document, positionForTypeBinding, _classificationFormatMap, _classificationTypeMap); ChangeSignatureLogger.LogChangeSignatureDialogLaunched(); var dialog = new ChangeSignatureDialog(viewModel); var result = dialog.ShowModal(); if (result.HasValue && result.Value) { ChangeSignatureLogger.LogChangeSignatureDialogCommitted(); var signatureChange = new SignatureChange(parameters, viewModel.GetParameterConfiguration()); signatureChange.LogTelemetry(); return(new ChangeSignatureOptionsResult(signatureChange, previewChanges: viewModel.PreviewChanges)); } return(null); }
public ChangeSignatureOptionsResult GetChangeSignatureOptions(ISymbol symbol, ParameterConfiguration parameters, INotificationService notificationService) { var viewModel = new ChangeSignatureDialogViewModel(notificationService, parameters, symbol, _classificationTypeMap); var dialog = new ChangeSignatureDialog(viewModel); var result = dialog.ShowModal(); if (result.HasValue && result.Value) { return new ChangeSignatureOptionsResult { IsCancelled = false, UpdatedSignature = new SignatureChange(parameters, viewModel.GetParameterConfiguration()), PreviewChanges = viewModel.PreviewChanges }; } else { return new ChangeSignatureOptionsResult { IsCancelled = true }; } }
public ChangeSignatureOptionsResult GetChangeSignatureOptions(ISymbol symbol, ParameterConfiguration parameters) { var viewModel = new ChangeSignatureDialogViewModel(parameters, symbol, _classificationFormatMap, _classificationTypeMap); var dialog = new ChangeSignatureDialog(viewModel); var result = dialog.ShowModal(); if (result.HasValue && result.Value) { return(new ChangeSignatureOptionsResult { IsCancelled = false, UpdatedSignature = new SignatureChange(parameters, viewModel.GetParameterConfiguration()), PreviewChanges = viewModel.PreviewChanges }); } else { return(new ChangeSignatureOptionsResult { IsCancelled = true }); } }
public ChangeSignatureOptionsResult?GetChangeSignatureOptions( Document document, int insertPosition, ISymbol symbol, ParameterConfiguration parameters) { var viewModel = new ChangeSignatureDialogViewModel( parameters, symbol, document, insertPosition, _classificationFormatMap, _classificationTypeMap); var dialog = new ChangeSignatureDialog(viewModel); var result = dialog.ShowModal(); if (result.HasValue && result.Value) { return(new ChangeSignatureOptionsResult(new SignatureChange(parameters, viewModel.GetParameterConfiguration()), previewChanges: viewModel.PreviewChanges)); } return(null); }
public TestAccessor(ChangeSignatureDialog dialog) { _dialog = dialog; }