211 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.Maui.Graphics (2)
PathBuilder.cs (2)
261 var previousCommand = _commandStack.Peek()?[0]; 515 bool isQuad = char.IsLetter(_commandStack.Peek()[0]);
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)
1039if (bracketCharacters.Match(bracketCharacterStack.Peek(), args[i])) 1089ThrowException(nameof(SR.ParserMarkupExtensionMalformedBracketCharacers), bracketCharacterStack.Peek().ToString(), lineNumber, linePosition);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleModeStack.cs (1)
48return _stack.Peek();
PresentationCore (2)
System\Windows\EventRoute.cs (2)
357return stack.Peek().Node; 384return stack.Peek().Source;
PresentationFramework (24)
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
1279return _calledProcessAnnotations.Peek(); 1283if (_calledProcessAnnotations.Peek() != value)
MS\Internal\Globalization\BamlResourceDeserializer.cs (2)
342_currentParent = _bamlTreeStack.Peek(); 383return stackForProperty.Peek();
MS\Internal\Ink\EditingCoordinator.cs (1)
1306EditingBehavior = _activationStack.Peek();
System\Windows\Application.cs (2)
409NestedBamlLoadInfo nestedBamlLoadInfo = s_NestedBamlLoadInfo.Peek(); 2416NestedBamlLoadInfo loadBamlSyncInfo = s_NestedBamlLoadInfo.Peek() as NestedBamlLoadInfo;
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
824DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Controls\SinglePageViewer.cs (1)
802DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (1)
366LookupResult result = _lookupResultStack.Peek();
System\Windows\Documents\XPSS0ValidatingLoader.cs (2)
97Hashtable validResources = (_validResources.Count > 0 ? _validResources.Peek() : null); 188Hashtable validResources = _validResources.Peek();
System\Windows\FrameworkContentElement.cs (1)
1400DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\FrameworkElement.cs (1)
3109DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\Markup\BamlReader.cs (6)
1513if (readFirstConstructor.Peek()) 1518if (readConstructor.Peek()) 1527if (readFirstConstructor.Peek()) 1531if (readConstructor.Peek()) 1578if (readFirstConstructor.Peek()) 1582if (readConstructor.Peek())
System\Windows\Markup\MarkupExtensionParser.cs (2)
1039if (bracketCharacters.Match(bracketCharacterStack.Peek(), args[i])) 1089ThrowException(nameof(SR.ParserMarkupExtensionMalformedBracketCharacers), bracketCharacterStack.Peek().ToString(), lineNumber, linePosition);
System\Windows\Markup\StyleModeStack.cs (1)
48return _stack.Peek();
System\Windows\TreeWalkHelper.cs (1)
247FrugalObjectList<DependencyProperty> parentInheritableProperties = info.InheritablePropertiesStack.Peek();
ReachFramework (2)
Serialization\Manager\ReachVisualSerializer.cs (1)
105NodeContext ctx = contextStack.Peek();
Serialization\Manager\ReachVisualSerializerAsync.cs (1)
156NodeContext 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)
1157_scopeStack.Peek() != scopeElement) 1168_scopeStack.Peek() != scopeElement) 1181DependencyObject stackParentScope = (_scopeStack.Count > 0 ? _scopeStack.Peek() : null); 1202ShowKeyTipsForScope(_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)
275frame = _stack.Peek(); 285TypeNameFrame frame = _stack.Peek(); 296TypeNameFrame frame = _stack.Peek(); 313TypeNameFrame frame = _stack.Peek();
System\Xaml\Parser\MeScanner.cs (1)
386if (_currentSpecialBracketCharacters.Match(bracketCharacterStack.Peek(), ch))
System\Xaml\Parser\XamlScannerStack.cs (8)
56get { return (_stack.Count == 0) ? null : _stack.Peek().XamlType; } 61get { return (_stack.Count == 0) ? null : _stack.Peek().TypeNamespace; } 66get { return (_stack.Count == 0) ? null : _stack.Peek().XamlProperty; } 67set { _stack.Peek().XamlProperty = value; } 72get { return (_stack.Count == 0) ? false : _stack.Peek().XmlSpacePreserve; } 76_stack.Peek().XmlSpacePreserve = value; 82get { return (_stack.Count == 0) ? false : _stack.Peek().InContent; } 86_stack.Peek().InContent = value;
System\Xaml\XamlMarkupExtensionWriter.cs (2)
354Node member = writer.nodes.Peek(); 378Node objectNode = writer.nodes.Peek();
System\Xaml\XamlObjectReader.cs (1)
1770!namesInCurrentScope.Peek().Add(Name))
System\Xaml\XamlXmlWriter.cs (53)
149Frame frame = namespaceScopes.Peek(); 341Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartMember); 363namespaceScopes.Peek().AssignNamespacePrefix(ns, prefix); 491Frame objectFrame = namespaceScopes.Peek(); 496objectFrame = namespaceScopes.Peek(); 517Frame frame = namespaceScopes.Peek(); 521frame = namespaceScopes.Peek(); 803Frame frame = writer.namespaceScopes.Peek(); 821Frame frame = writer.namespaceScopes.Peek(); 893Frame frame = writer.namespaceScopes.Peek(); 946writer.namespaceScopes.Peek().Type = type; 947writer.namespaceScopes.Peek().IsObjectFromMember = isObjectFromMember; 989if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 994Type = writer.namespaceScopes.Peek().Type 1005if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 1010Type = writer.namespaceScopes.Peek().Type, 1013writer.namespaceScopes.Peek().Member = property; 1015XamlType parentType = writer.namespaceScopes.Peek().Type; 1022XamlType containingType = writer.namespaceScopes.Peek().Type; 1025if (!writer.namespaceScopes.Peek().IsEmpty()) 1032if (!writer.namespaceScopes.Peek().IsEmpty()) 1119XamlType parentType = writer.namespaceScopes.Peek().Type; 1146Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartObject || 1147writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.GetObject); 1152Type = writer.namespaceScopes.Peek().Type, 1156XamlType containingType = writer.namespaceScopes.Peek().Type; 1224if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1225writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1234Frame frame = writer.namespaceScopes.Peek(); 1352if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1353writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1358writer.namespaceScopes.Peek().Type = type; 1359writer.namespaceScopes.Peek().IsObjectFromMember = isObjectFromMember; 1365if (!writer.namespaceScopes.Peek().IsEmpty()) 1371Frame frame = writer.namespaceScopes.Peek(); 1675writer.namespaceScopes.Peek().IsContent = true; 1682var property = writer.namespaceScopes.Peek().Member; 1685writer.namespaceScopes.Peek().IsContent = true; 1689writer.namespaceScopes.Peek().IsContent = false; 1698writer.namespaceScopes.Peek().IsContent = true; 1717writer.namespaceScopes.Peek().IsContent = true; 1728var property = writer.namespaceScopes.Peek().Member; 1731writer.namespaceScopes.Peek().IsContent = true; 1739writer.namespaceScopes.Peek().IsContent = false; 1747writer.namespaceScopes.Peek().IsContent = true; 1783writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartObject, type)); 1788writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.GetObject)); 1800writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndObject)); 1821writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartMember, property)); 1833writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndMember)); 1845writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.NamespaceDeclaration, namespaceDeclaration)); 1857writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.Value, value)); 1882Frame 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))