209 references to Peek
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (1)
1121currentFrame = (ParseElementOnlyContent_LocalFrame)localFrames.Peek();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
1622object stackTop = _blockStack.Peek();
illink (1)
ILLink.Tasks (2)
CreateRuntimeRootDescriptorFile.cs (2)
520 if (activeSections.Count > 0 && activeSections.Peek () != true) { 565 get => activeSections.Count == 0 || activeSections.Peek () == true;
Microsoft.AspNetCore.Components (5)
Rendering\RenderTreeBuilder.cs (5)
50var indexOfLastElementOrComponent = _openElementIndices.Peek(); 560var indexOfLastElementOrComponent = _openElementIndices.Peek(); 696var indexOfLastElementOrComponent = _openElementIndices.Peek(); 733=> _openElementIndices.Count == 0 ? (int?)null : _openElementIndices.Peek(); 782ref var invalidFrame = ref _entries.Buffer[_openElementIndices.Peek()];
Microsoft.Build (8)
Evaluation\LazyItemEvaluator.cs (3)
329var globsToIgnoreFromFutureOperations = globsToIgnoreStack?.Peek() ?? globsToIgnore; 362ImmutableHashSet<string> currentGlobsToIgnore = globsToIgnoreStack == null ? globsToIgnore : globsToIgnoreStack.Peek(); 425currentGlobsToIgnore = globsToIgnoreStack.Count == 0 ? globsToIgnore : globsToIgnoreStack.Peek();
Evaluation\Preprocessor.cs (1)
325destination.AppendChild(destinationDocument.CreateComment("\r\n" + new String('=', 140) + "\r\n </Import>\r\n\r\n" + _filePaths.Peek()?.Replace("--", "__") + "\r\n" + new String('=', 140) + "\r\n"));
Evaluation\Profiler\EvaluationProfiler.cs (3)
25private EvaluationLocation CurrentLocation => _evaluationStack.Count == 0 ? EvaluationLocation.EmptyLocation : _evaluationStack.Peek().Location; 119_evaluationProfiler._evaluationStack.Peek()._exclusiveTime.Stop(); 140_evaluationProfiler._evaluationStack.Peek()._exclusiveTime.Start();
Logging\SerialConsoleLogger.cs (1)
937return _frames.Peek();
Microsoft.Cci.Extensions (1)
Traversers\DependencyTraverser.cs (1)
195IDefinition definition = _definitionStack.Peek();
Microsoft.CodeAnalysis (17)
CodeGen\LocalScopeManager.cs (1)
35private ScopeInfo CurrentScope => _scopes.Peek();
Syntax\SyntaxDiffer.cs (16)
204bool oldIsToken = _oldNodes.Peek().IsToken; 205bool newIsToken = _newNodes.Peek().IsToken; 213FindBestMatch(_newNodes, _oldNodes.Peek(), out indexOfOldInNew, out similarityOfOldInNew); 214FindBestMatch(_oldNodes, _newNodes.Peek(), out indexOfNewInOld, out similarityOfNewInOld); 220if (AreIdentical(_oldNodes.Peek(), _newNodes.Peek())) 253FindBestMatch(_oldNodes, _oldNodes.Peek(), out indexOfOldInOld, out similarityOfOldInOld, 1); 265if (AreSimilar(_oldNodes.Peek(), _newNodes.Peek())) 287if (AreSimilar(_oldNodes.Peek(), _newNodes.Peek())) 309var sim = GetSimilarity(_oldNodes.Peek(), _newNodes.Peek()); 310if (sim >= Math.Max(_oldNodes.Peek().FullSpan.Length, _newNodes.Peek().FullSpan.Length)) 568int start = _oldNodes.Count > 0 ? _oldNodes.Peek().Position : _oldSpan.End;
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (2)
93var currentNode = spineNodes.Peek(); 146var parentNode = spineNodes.Peek();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
434Contract.ThrowIfFalse(Equals(contextualSymbol, _contextualSymbolStack.Peek())); 439=> _contextualSymbolStack.Count == 0 ? null : _contextualSymbolStack.Peek();
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.cs (3)
1261StringBuilder builder = _temporaryStringBuilders.Peek().Pooled.Builder; 1274StringBuilder builder = _temporaryStringBuilders.Peek().Pooled.Builder; 1289StringBuilder builder = _temporaryStringBuilders.Peek().Pooled.Builder;
Microsoft.CodeAnalysis.CSharp.Features (1)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
660var lastSelectExpression = ((SelectClauseSyntax)queryExpressionProcessingInfo.Stack.Peek()).Expression;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\LookupPositionTests.cs (3)
3144expectedNames[i] = stack.Peek(); 3165string[] prev = stack.Peek(); 3176string[] prev = stack.Peek();
Microsoft.CodeAnalysis.Features (5)
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (3)
96internal (string target, string hint) NavigationTarget => _navigationTargetStack.Peek(); 97internal TaggedTextStyle Style => _styleStack.Peek(); 175=> _styleStack.Push(_styleStack.Peek() | style);
ExtractMethod\MethodExtractor.TriviaResult.cs (2)
154var top = stack.Peek(); 158top = stack.Peek();
Microsoft.CodeAnalysis.VisualBasic (4)
Compilation\DocumentationComments\DocWriter.vb (3)
61Dim builder As StringBuilder = Me._temporaryStringBuilders.Peek().Pooled.Builder 75Dim builder As StringBuilder = Me._temporaryStringBuilders.Peek().Pooled.Builder 88Dim builder As StringBuilder = Me._temporaryStringBuilders.Peek().Pooled.Builder
Lowering\Diagnostics\DiagnosticsPass.vb (1)
211Debug.Assert(_expressionsBeingVisited.Peek Is node)
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (2)
93var currentNode = spineNodes.Peek(); 146var parentNode = spineNodes.Peek();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
434Contract.ThrowIfFalse(Equals(contextualSymbol, _contextualSymbolStack.Peek())); 439=> _contextualSymbolStack.Count == 0 ? null : _contextualSymbolStack.Peek();
Microsoft.DotNet.PackageTesting (2)
VerifyClosure.cs (2)
176AssemblyInfo assm = depStack.Peek(); 277AssemblyInfo assm = depStack.Peek();
Microsoft.DotNet.SharedFramework.Sdk (2)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (2)
176AssemblyInfo assm = depStack.Peek(); 277AssemblyInfo assm = depStack.Peek();
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Modeler\ServiceClientModelFactory.cs (4)
56private string CurrentMethodName => _methodNameStack.Value.Count != 0 ? _methodNameStack.Value.Peek() : null; 58private string CurrentParameterName => _parameterNameStack.Value.Count != 0 ? _parameterNameStack.Value.Peek() : "Value"; 60private string CurrentTypeName => _typeNameStack.Value.Count != 0 ? _typeNameStack.Value.Peek() : null; 62private string CurrentPropertyName => _propertyNameStack.Value.Count != 0 ? _propertyNameStack.Value.Peek() : "Value";
Microsoft.Extensions.Configuration.Json (3)
JsonConfigurationFileParser.cs (3)
77_data[_paths.Peek()] = null; 100string key = _paths.Peek(); 115_paths.Peek() + ConfigurationPath.KeyDelimiter + context :
Microsoft.Extensions.Configuration.Xml (2)
XmlStreamConfigurationProvider.cs (2)
71var parent = currentPath.Peek(); 153XmlConfigurationElement parent = currentPath.Peek();
Microsoft.Extensions.Identity.Core (1)
TokenProviderDescriptor.cs (1)
30public Type ProviderType => _providerTypes.Peek();
Microsoft.ML.Data (1)
Prediction\Calibrator.cs (1)
1895top = stack.Peek();
Microsoft.ML.TorchSharp (1)
AutoFormerV2\ObjectDetectionMetrics.cs (1)
272float precisionRecord = prStack.Peek().Item1;
PresentationBuildTasks (3)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (2)
1046if (bracketCharacters.Match(bracketCharacterStack.Peek(), args[i])) 1096ThrowException(nameof(SR.ParserMarkupExtensionMalformedBracketCharacers), bracketCharacterStack.Peek().ToString(), lineNumber, linePosition);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleModeStack.cs (1)
52return _stack.Peek();
PresentationCore (2)
System\Windows\EventRoute.cs (2)
363return stack.Peek().Node; 390return stack.Peek().Source;
PresentationFramework (24)
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
1290return _calledProcessAnnotations.Peek(); 1294if (_calledProcessAnnotations.Peek() != value)
MS\Internal\Globalization\BamlResourceDeserializer.cs (2)
349_currentParent = _bamlTreeStack.Peek(); 390return stackForProperty.Peek();
MS\Internal\Ink\EditingCoordinator.cs (1)
1321EditingBehavior = _activationStack.Peek();
System\Windows\Application.cs (2)
422NestedBamlLoadInfo nestedBamlLoadInfo = s_NestedBamlLoadInfo.Peek(); 2429NestedBamlLoadInfo loadBamlSyncInfo = s_NestedBamlLoadInfo.Peek() as NestedBamlLoadInfo;
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
827DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Controls\SinglePageViewer.cs (1)
805DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (1)
372LookupResult result = _lookupResultStack.Peek();
System\Windows\Documents\XPSS0ValidatingLoader.cs (2)
106Hashtable validResources = (_validResources.Count > 0 ? _validResources.Peek() : null); 197Hashtable validResources = _validResources.Peek();
System\Windows\FrameworkContentElement.cs (1)
1412DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\FrameworkElement.cs (1)
3120DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\Markup\BamlReader.cs (6)
1523if (readFirstConstructor.Peek()) 1528if (readConstructor.Peek()) 1537if (readFirstConstructor.Peek()) 1541if (readConstructor.Peek()) 1588if (readFirstConstructor.Peek()) 1592if (readConstructor.Peek())
System\Windows\Markup\MarkupExtensionParser.cs (2)
1046if (bracketCharacters.Match(bracketCharacterStack.Peek(), args[i])) 1096ThrowException(nameof(SR.ParserMarkupExtensionMalformedBracketCharacers), bracketCharacterStack.Peek().ToString(), lineNumber, linePosition);
System\Windows\Markup\StyleModeStack.cs (1)
52return _stack.Peek();
System\Windows\TreeWalkHelper.cs (1)
251FrugalObjectList<DependencyProperty> parentInheritableProperties = info.InheritablePropertiesStack.Peek();
ReachFramework (2)
Serialization\Manager\ReachVisualSerializer.cs (1)
118NodeContext ctx = contextStack.Peek();
Serialization\Manager\ReachVisualSerializerAsync.cs (1)
168NodeContext ctx = contextStack.Peek();
System.Composition.Hosting (1)
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
117if (dependencies.Count == 0 || dependencies.Peek() == null)
System.Console (1)
System\IO\StdInReader.cs (1)
293ConsoleKeyInfo keyInfo = peek ? _availableKeys.Peek() : _availableKeys.Pop();
System.Linq.Expressions (4)
System\Dynamic\BindingRestrictions.cs (1)
174while (_tests.Count > 0 && _tests.Peek().Depth == depth)
System\Linq\Expressions\Compiler\VariableBinder.cs (2)
65_constants.Peek().AddReference(node.Value!, node.Type); 161CompilerScope currentScope = _scopes.Peek();
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
1940CompileParameterExpression(_exceptionForRethrowStack.Peek());
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\CodeGenerator.cs (1)
1230object stackTop = _blockStack.Peek();
System.Private.Xml (13)
System\Xml\Schema\DtdParser.cs (1)
1109currentFrame = (ParseElementOnlyContent_LocalFrame)localFrames.Peek();
System\Xml\Schema\DtdParserAsync.cs (1)
740currentFrame = (ParseElementOnlyContent_LocalFrame)localFrames.Peek();
System\Xml\Schema\XsdBuilder.cs (1)
843get { return _containerStack.Peek(); }
System\Xml\Serialization\CodeGenerator.cs (6)
397_ilGen!.Emit(OpCodes.Leave, _leaveLabels.Peek()); 1311IfState ifState = (IfState)_blockStack.Peek(); 1332IfState ifState = (IfState)_blockStack.Peek(); 1404WhileState whileState = _whileStack!.Peek(); 1410WhileState whileState = _whileStack!.Peek(); 1420WhileState whileState = _whileStack!.Peek();
System\Xml\Xsl\XsltOld\Compiler.cs (4)
654Debug.Assert(this.stylesheet == _stylesheets!.Peek()); 656this.stylesheet = _stylesheets.Peek(); 666Debug.Assert(this.stylesheet == _stylesheets!.Peek()); 676Debug.Assert(this.stylesheet == _stylesheets!.Peek());
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\KeyTipService.cs (4)
1159_scopeStack.Peek() != scopeElement) 1170_scopeStack.Peek() != scopeElement) 1183DependencyObject stackParentScope = (_scopeStack.Count > 0 ? _scopeStack.Peek() : null); 1204ShowKeyTipsForScope(_scopeStack.Peek(), true);
System.Windows.Forms.Design (4)
System\ComponentModel\Design\DesignerHost.DesignerHostTransaction.cs (4)
37if (transactions.Peek() != this) 39string nestedDescription = transactions.Peek().Description; 70if (transactions.Peek() != this) 72string nestedDescription = transactions.Peek().Description;
System.Xaml (69)
System\Xaml\Parser\GenericTypeNameParser.cs (4)
278frame = _stack.Peek(); 288TypeNameFrame frame = _stack.Peek(); 299TypeNameFrame frame = _stack.Peek(); 316TypeNameFrame frame = _stack.Peek();
System\Xaml\Parser\MeScanner.cs (1)
389if (_currentSpecialBracketCharacters.Match(bracketCharacterStack.Peek(), ch))
System\Xaml\Parser\XamlScannerStack.cs (8)
58get { return (_stack.Count == 0) ? null : _stack.Peek().XamlType; } 63get { return (_stack.Count == 0) ? null : _stack.Peek().TypeNamespace; } 68get { return (_stack.Count == 0) ? null : _stack.Peek().XamlProperty; } 69set { _stack.Peek().XamlProperty = value; } 74get { return (_stack.Count == 0) ? false : _stack.Peek().XmlSpacePreserve; } 78_stack.Peek().XmlSpacePreserve = value; 84get { return (_stack.Count == 0) ? false : _stack.Peek().InContent; } 88_stack.Peek().InContent = value;
System\Xaml\XamlMarkupExtensionWriter.cs (2)
355Node member = writer.nodes.Peek(); 379Node objectNode = writer.nodes.Peek();
System\Xaml\XamlObjectReader.cs (1)
1775!namesInCurrentScope.Peek().Add(Name))
System\Xaml\XamlXmlWriter.cs (53)
151Frame frame = namespaceScopes.Peek(); 343Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartMember); 365namespaceScopes.Peek().AssignNamespacePrefix(ns, prefix); 493Frame objectFrame = namespaceScopes.Peek(); 498objectFrame = namespaceScopes.Peek(); 519Frame frame = namespaceScopes.Peek(); 523frame = namespaceScopes.Peek(); 805Frame frame = writer.namespaceScopes.Peek(); 823Frame frame = writer.namespaceScopes.Peek(); 895Frame frame = writer.namespaceScopes.Peek(); 948writer.namespaceScopes.Peek().Type = type; 949writer.namespaceScopes.Peek().IsObjectFromMember = isObjectFromMember; 991if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 996Type = writer.namespaceScopes.Peek().Type 1007if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 1012Type = writer.namespaceScopes.Peek().Type, 1015writer.namespaceScopes.Peek().Member = property; 1017XamlType parentType = writer.namespaceScopes.Peek().Type; 1024XamlType containingType = writer.namespaceScopes.Peek().Type; 1027if (!writer.namespaceScopes.Peek().IsEmpty()) 1034if (!writer.namespaceScopes.Peek().IsEmpty()) 1121XamlType parentType = writer.namespaceScopes.Peek().Type; 1148Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartObject || 1149writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.GetObject); 1154Type = writer.namespaceScopes.Peek().Type, 1158XamlType containingType = writer.namespaceScopes.Peek().Type; 1226if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1227writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1236Frame frame = writer.namespaceScopes.Peek(); 1354if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1355writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1360writer.namespaceScopes.Peek().Type = type; 1361writer.namespaceScopes.Peek().IsObjectFromMember = isObjectFromMember; 1367if (!writer.namespaceScopes.Peek().IsEmpty()) 1373Frame frame = writer.namespaceScopes.Peek(); 1677writer.namespaceScopes.Peek().IsContent = true; 1684var property = writer.namespaceScopes.Peek().Member; 1687writer.namespaceScopes.Peek().IsContent = true; 1691writer.namespaceScopes.Peek().IsContent = false; 1700writer.namespaceScopes.Peek().IsContent = true; 1719writer.namespaceScopes.Peek().IsContent = true; 1730var property = writer.namespaceScopes.Peek().Member; 1733writer.namespaceScopes.Peek().IsContent = true; 1741writer.namespaceScopes.Peek().IsContent = false; 1749writer.namespaceScopes.Peek().IsContent = true; 1785writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartObject, type)); 1790writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.GetObject)); 1802writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndObject)); 1823writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartMember, property)); 1835writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndMember)); 1847writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.NamespaceDeclaration, namespaceDeclaration)); 1859writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.Value, value)); 1884Frame frame = writer.namespaceScopes.Peek();
xunit.console (5)
CommandLine.cs (5)
213if (arguments.Peek().StartsWith("-", StringComparison.Ordinal) || arguments.Peek().StartsWith("@", StringComparison.Ordinal)) 225var value = arguments.Peek(); 500!arguments.Peek().StartsWith("-", StringComparison.Ordinal) && 501!arguments.Peek().StartsWith("@", StringComparison.Ordinal))