Snippets\SnippetExpansionClient.cs (32)
114public IVsExpansionSession? ExpansionSession => _state._expansionSession;
117public bool IsFullMethodCallSnippet => _state.IsFullMethodCallSnippet;
407var tabbedInsideSnippetField = VSConstants.S_OK == ExpansionSession.GoToNextExpansionField(fCommitIfLast: _state.IsFullMethodCallSnippet ? 1 : 0);
516Debug.Assert(_state.IsFullMethodCallSnippet);
520if (expansion.InsertExpansion(textSpan, textSpan, this, _languageHelper.LanguageServiceGuid, out _state._expansionSession) == VSConstants.S_OK)
524Debug.Assert(!_state.IsFullMethodCallSnippet);
558if (expansion.InsertSpecificExpansion(doc, textSpan, this, _languageHelper.LanguageServiceGuid, pszRelativePath: null, out _state._expansionSession) == VSConstants.S_OK)
560Debug.Assert(_state._expansionSession != null);
561_state._methodNameForInsertFullMethodCall = methodSymbols.First().Name;
562Debug.Assert(_state._method == null);
720if (!_state.IsFullMethodCallSnippet)
727if (!newModel.UserSelected && _state._method is not null)
792if (SymbolEquivalenceComparer.Instance.Equals(_state._method, method))
797if (_state._methodNameForInsertFullMethodCall != method.Name)
810if (_state._method is null && method.Parameters.Length == 0)
812_state._method = method;
839var firstField = _state._method?.Parameters.FirstOrDefault()?.Name ?? PlaceholderSnippetField;
849var lastField = _state._method?.Parameters.LastOrDefault()?.Name ?? PlaceholderSnippetField;
865var newArguments = _state._arguments;
867if (_state._method is null || !_state._method.Parameters.Any())
885else if (_state._method is not null)
887foreach (var previousParameter in _state._method.Parameters)
926if (expansion.InsertSpecificExpansion(doc, adjustedTextSpan, this, _languageHelper.LanguageServiceGuid, pszRelativePath: null, out _state._expansionSession) == VSConstants.S_OK)
928Debug.Assert(_state._expansionSession != null);
929_state._methodNameForInsertFullMethodCall = method.Name;
930_state._method = method;
931_state._arguments = newArguments;
956_state.Clear();
986_state._expansionSession = pSession;
1016hr = expansion.InsertNamedExpansion(pszTitle, pszPath, textSpan, this, _languageHelper.LanguageServiceGuid, fShowDisambiguationUI: 0, pSession: out _state._expansionSession);
1024_state._expansionSession = null;