internal ChangeSignatureDialogViewModel(ParameterConfiguration parameters, ISymbol symbol)
        {
            _originalParameterConfiguration = parameters;

            int startingSelectedIndex = 0;

            if (parameters.ThisParameter != null)
            {
                startingSelectedIndex++;

                _thisParameter = new ParameterViewModel(this, parameters.ThisParameter);
                _disabledParameters.Add(parameters.ThisParameter);
            }

            if (parameters.ParamsParameter != null)
            {
                _paramsParameter = new ParameterViewModel(this, parameters.ParamsParameter);
            }

            _declarationParts = symbol.ToDisplayParts(_symbolDeclarationDisplayFormat);

            _parameterGroup1 = parameters.ParametersWithoutDefaultValues.Select(p => new ParameterViewModel(this, p)).ToList();
            _parameterGroup2 = parameters.RemainingEditableParameters.Select(p => new ParameterViewModel(this, p)).ToList();
            SelectedIndex = startingSelectedIndex;
        }
Esempio n. 2
0
        internal ChangeSignatureDialogViewModel(ParameterConfiguration parameters, ISymbol symbol)
        {
            _originalParameterConfiguration = parameters;

            int startingSelectedIndex = 0;

            if (parameters.ThisParameter != null)
            {
                startingSelectedIndex++;

                _thisParameter = new ParameterViewModel(this, parameters.ThisParameter);
                _disabledParameters.Add(parameters.ThisParameter);
            }

            if (parameters.ParamsParameter != null)
            {
                _paramsParameter = new ParameterViewModel(this, parameters.ParamsParameter);
            }

            _declarationParts = symbol.ToDisplayParts(_symbolDeclarationDisplayFormat);

            _parameterGroup1 = parameters.ParametersWithoutDefaultValues.Select(p => new ParameterViewModel(this, p)).ToList();
            _parameterGroup2 = parameters.RemainingEditableParameters.Select(p => new ParameterViewModel(this, p)).ToList();
            SelectedIndex    = startingSelectedIndex;
        }
Esempio n. 3
0
 public SignatureChange(ParameterConfiguration originalConfiguration, ParameterConfiguration updatedConfiguration)
 {
     OriginalConfiguration = originalConfiguration;
     UpdatedConfiguration  = updatedConfiguration;
 }
Esempio n. 4
0
 public SignatureChange(ParameterConfiguration originalConfiguration, ParameterConfiguration updatedConfiguration)
 {
     OriginalConfiguration = originalConfiguration;
     UpdatedConfiguration = updatedConfiguration;
 }