diff --git a/src/VisualStudio/Core/Def/Implementation/AnalyzerDependency/AnalyzerFileWatcherService.cs b/src/VisualStudio/Core/Def/Implementation/AnalyzerDependency/AnalyzerFileWatcherService.cs index 6e10df52981f1..9a23321c50303 100644 --- a/src/VisualStudio/Core/Def/Implementation/AnalyzerDependency/AnalyzerFileWatcherService.cs +++ b/src/VisualStudio/Core/Def/Implementation/AnalyzerDependency/AnalyzerFileWatcherService.cs @@ -70,7 +70,7 @@ private void RaiseAnalyzerChangedWarning(ProjectId projectId, string analyzerPat } } - private DateTime? GetLastUpdateTimeUtc(string fullPath) + private static DateTime? GetLastUpdateTimeUtc(string fullPath) { try { diff --git a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyDetail.cs b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyDetail.cs index 394999b3b3a8b..997b303b6a679 100644 --- a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyDetail.cs +++ b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyDetail.cs @@ -35,7 +35,7 @@ public CallHierarchyDetail(Location location, Workspace workspace) _text = ComputeText(location); } - private string ComputeText(Location location) + private static string ComputeText(Location location) { var lineSpan = location.GetLineSpan(); var start = location.SourceTree.GetText().Lines[lineSpan.StartLinePosition.Line].Start; diff --git a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyProvider.cs b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyProvider.cs index 5639615248534..1a9df802ffa04 100644 --- a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyProvider.cs +++ b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/CallHierarchyProvider.cs @@ -66,7 +66,7 @@ public async Task CreateItemAsync(ISymbol symbol, return null; } - private ISymbol GetTargetSymbol(ISymbol symbol) + private static ISymbol GetTargetSymbol(ISymbol symbol) { if (symbol is IMethodSymbol methodSymbol) { diff --git a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/Finders/AbstractCallFinder.cs b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/Finders/AbstractCallFinder.cs index 84518aadbb130..322bfe72e8c1c 100644 --- a/src/VisualStudio/Core/Def/Implementation/CallHierarchy/Finders/AbstractCallFinder.cs +++ b/src/VisualStudio/Core/Def/Implementation/CallHierarchy/Finders/AbstractCallFinder.cs @@ -110,7 +110,7 @@ private async Task SearchAsync(Workspace workspace, CallHierarchySearchScope sco await SearchWorkerAsync(symbol, project, callback, documents, cancellationToken).ConfigureAwait(false); } - private IImmutableSet IncludeDocuments(CallHierarchySearchScope scope, Project project) + private static IImmutableSet IncludeDocuments(CallHierarchySearchScope scope, Project project) { if (scope == CallHierarchySearchScope.CurrentDocument || scope == CallHierarchySearchScope.CurrentProject) { diff --git a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.ParameterViewModels.cs b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.ParameterViewModels.cs index 4f5be59c9102f..e6b8c76bf948f 100644 --- a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.ParameterViewModels.cs +++ b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.ParameterViewModels.cs @@ -40,7 +40,7 @@ public ParameterViewModel(ChangeSignatureDialogViewModel changeSignatureDialogVi ChangeSignatureDialogViewModel = changeSignatureDialogViewModel; } - private string ValueOrNone(string value) + private static string ValueOrNone(string value) { return !string.IsNullOrEmpty(value) ? value diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs index 91c86a2175fab..4041e0a006451 100644 --- a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs @@ -9,7 +9,7 @@ internal partial class ColorSchemeApplier private class RegistryItem { public string SectionName { get; } - public string ValueName => "Data"; + public static string ValueName => "Data"; public byte[] ValueData { get; } public RegistryItem(string sectionName, byte[] valueData) diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs index 5b86843c69ef5..84a805d085497 100644 --- a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs @@ -47,7 +47,7 @@ private ColorScheme GetColorScheme(SchemeName schemeName) return ColorSchemeReader.ReadColorScheme(colorSchemeStream); } - private Stream GetColorSchemeXmlStream(SchemeName schemeName) + private static Stream GetColorSchemeXmlStream(SchemeName schemeName) { var assembly = Assembly.GetExecutingAssembly(); return assembly.GetManifestResourceStream($"Microsoft.VisualStudio.LanguageServices.ColorSchemes.{schemeName}.xml"); @@ -60,7 +60,7 @@ public void ApplyColorScheme(SchemeName schemeName, ImmutableArray foreach (var item in registryItems) { using var itemKey = registryRoot.CreateSubKey(item.SectionName); - itemKey.SetValue(item.ValueName, item.ValueData); + itemKey.SetValue(RegistryItem.ValueName, item.ValueData); // Flush RegistryKeys out of paranoia itemKey.Flush(); } diff --git a/src/VisualStudio/Core/Def/Implementation/CommonControls/MemberSelectionViewModel.cs b/src/VisualStudio/Core/Def/Implementation/CommonControls/MemberSelectionViewModel.cs index 80a937f925d46..83f65e2913793 100644 --- a/src/VisualStudio/Core/Def/Implementation/CommonControls/MemberSelectionViewModel.cs +++ b/src/VisualStudio/Core/Def/Implementation/CommonControls/MemberSelectionViewModel.cs @@ -142,7 +142,7 @@ public void UpdateMembersBasedOnDestinationKind(TypeKind destinationType) } } - private void SelectMembers(ImmutableArray members, bool isChecked = true) + private static void SelectMembers(ImmutableArray members, bool isChecked = true) { foreach (var member in members.Where(viewModel => viewModel.IsCheckable)) { diff --git a/src/VisualStudio/Core/Def/Implementation/ContainedLanguageRefactorNotifyService.cs b/src/VisualStudio/Core/Def/Implementation/ContainedLanguageRefactorNotifyService.cs index e77107eedca8e..cc1c5cceb9d8f 100644 --- a/src/VisualStudio/Core/Def/Implementation/ContainedLanguageRefactorNotifyService.cs +++ b/src/VisualStudio/Core/Def/Implementation/ContainedLanguageRefactorNotifyService.cs @@ -68,7 +68,7 @@ public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable data, ArrayBuilder filteredData) + private static void AddFilteredInfos(ImmutableArray data, ArrayBuilder filteredData) { using var _ = PooledHashSet.GetInstance(out var seenDocumentIds); @@ -279,7 +279,7 @@ private async Task NotifyCpsProjectSystemAsync( await Task.WhenAll(tasks).ConfigureAwait(false); } - private async Task NotifyCpsProjectSystemAsync( + private static async Task NotifyCpsProjectSystemAsync( IProjectItemDesignerTypeUpdateService updateService, DesignerAttributeData data, CancellationToken cancellationToken) diff --git a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticAnalyzerService.cs b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticAnalyzerService.cs index 5832ad43cb826..c2434dbafc58a 100644 --- a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticAnalyzerService.cs +++ b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticAnalyzerService.cs @@ -142,7 +142,7 @@ public IReadOnlyDictionary> GetAllDiag } } - private IReadOnlyDictionary> Transform( + private static IReadOnlyDictionary> Transform( ImmutableDictionary> map) { // unfortunately, we had to do this since ruleset editor and us are set to use this signature diff --git a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticModeService.cs b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticModeService.cs index f547f08b76b5a..bab3a0d35803c 100644 --- a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticModeService.cs +++ b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioDiagnosticModeService.cs @@ -69,7 +69,7 @@ private DiagnosticMode ComputeDiagnosticMode(Option2 option) return _workspace.Options.GetOption(option); } - private bool IsInCodeSpacesServer() + private static bool IsInCodeSpacesServer() { // hack until there is an officially supported free-threaded synchronous platform API to ask this question. return Environment.GetEnvironmentVariable("VisualStudioServerMode") == "1"; diff --git a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioVenusSpanMappingService.cs b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioVenusSpanMappingService.cs index 524ddbd227d66..2be78d3cb5df8 100644 --- a/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioVenusSpanMappingService.cs +++ b/src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioVenusSpanMappingService.cs @@ -120,7 +120,7 @@ private bool TryAdjustSpanIfNeededForVenus( return startChanged || endChanged; } - private LinePositionSpan GetLinePositionSpan(LinePosition position1, LinePosition position2) + private static LinePositionSpan GetLinePositionSpan(LinePosition position1, LinePosition position2) { if (position1 <= position2) { diff --git a/src/VisualStudio/Core/Def/Implementation/FindReferences/Entries/DocumentSpanEntry.cs b/src/VisualStudio/Core/Def/Implementation/FindReferences/Entries/DocumentSpanEntry.cs index c98459693e886..d2a9138109456 100644 --- a/src/VisualStudio/Core/Def/Implementation/FindReferences/Entries/DocumentSpanEntry.cs +++ b/src/VisualStudio/Core/Def/Implementation/FindReferences/Entries/DocumentSpanEntry.cs @@ -168,7 +168,7 @@ private DisposableToolTip CreateDisposableToolTip(Document document, TextSpan so return controlService.CreateDisposableToolTip(document, textBuffer, contentSpan, EnvironmentColors.ToolWindowBackgroundBrushKey); } - private void SetStaticClassifications(ITextBuffer textBuffer, ImmutableArray classifiedSpans) + private static void SetStaticClassifications(ITextBuffer textBuffer, ImmutableArray classifiedSpans) { var key = PredefinedPreviewTaggerKeys.StaticClassificationSpansKey; textBuffer.Properties.RemoveProperty(key); diff --git a/src/VisualStudio/Core/Def/Implementation/GenerateType/GenerateTypeDialogViewModel.cs b/src/VisualStudio/Core/Def/Implementation/GenerateType/GenerateTypeDialogViewModel.cs index 57ffabd0dcb8f..a2b5a1b9c0b25 100644 --- a/src/VisualStudio/Core/Def/Implementation/GenerateType/GenerateTypeDialogViewModel.cs +++ b/src/VisualStudio/Core/Def/Implementation/GenerateType/GenerateTypeDialogViewModel.cs @@ -692,7 +692,7 @@ internal void UpdateFileNameExtension() this.FileName = currentFileName; } - private string UpdateExtension(string currentFileName, string desiredFileExtension, string undesiredFileExtension) + private static string UpdateExtension(string currentFileName, string desiredFileExtension, string undesiredFileExtension) { if (currentFileName.EndsWith(desiredFileExtension, StringComparison.OrdinalIgnoreCase)) { diff --git a/src/VisualStudio/Core/Def/Implementation/InlineRename/InlineRenameUndoManager.cs b/src/VisualStudio/Core/Def/Implementation/InlineRename/InlineRenameUndoManager.cs index ff0bce77036a7..e25b093e46e52 100644 --- a/src/VisualStudio/Core/Def/Implementation/InlineRename/InlineRenameUndoManager.cs +++ b/src/VisualStudio/Core/Def/Implementation/InlineRename/InlineRenameUndoManager.cs @@ -218,7 +218,7 @@ private IOleUndoManager GetUndoManager(ITextBuffer subjectBuffer) return null; } - private IEnumerable GetUndoUnits(IOleUndoManager undoManager) + private static IEnumerable GetUndoUnits(IOleUndoManager undoManager) { IEnumOleUndoUnits undoUnitEnumerator; try diff --git a/src/VisualStudio/Core/Def/Implementation/LanguageService/AbstractLanguageService`2.cs b/src/VisualStudio/Core/Def/Implementation/LanguageService/AbstractLanguageService`2.cs index 2101dae5fe52f..ee5189538cfd6 100644 --- a/src/VisualStudio/Core/Def/Implementation/LanguageService/AbstractLanguageService`2.cs +++ b/src/VisualStudio/Core/Def/Implementation/LanguageService/AbstractLanguageService`2.cs @@ -281,7 +281,7 @@ private bool ContainsRegionTag(ITextSnapshot textSnapshot) return false; } - private bool StartsWithRegionTag(ITextSnapshotLine line) + private static bool StartsWithRegionTag(ITextSnapshotLine line) { var start = line.GetFirstNonWhitespacePosition(); if (start != null) diff --git a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractDescriptionBuilder.cs b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractDescriptionBuilder.cs index 680a760959257..d07277fb4712a 100644 --- a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractDescriptionBuilder.cs +++ b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractDescriptionBuilder.cs @@ -443,7 +443,7 @@ private void BuildXmlDocumentation(ISymbol symbol, Compilation compilation) } } - private bool ShowReturnsDocumentation(ISymbol symbol) + private static bool ShowReturnsDocumentation(ISymbol symbol) { return (symbol.Kind == SymbolKind.NamedType && ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Delegate) || symbol.Kind == SymbolKind.Method diff --git a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractListItemFactory.cs b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractListItemFactory.cs index ab1e2c7197596..3af2b4570a10f 100644 --- a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractListItemFactory.cs +++ b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractListItemFactory.cs @@ -164,7 +164,7 @@ private static bool IncludeMemberSymbol(ISymbol symbol, IAssemblySymbol assembly return false; } - private ImmutableArray CreateListItemsFromSymbols( + private static ImmutableArray CreateListItemsFromSymbols( ImmutableArray symbols, Compilation compilation, ProjectId projectId, @@ -313,7 +313,7 @@ private ImmutableArray GetMemberListItems( return builder.ToImmutable(); } - private ImmutableArray GetMemberSymbols(INamedTypeSymbol namedTypeSymbol, Compilation compilation) + private static ImmutableArray GetMemberSymbols(INamedTypeSymbol namedTypeSymbol, Compilation compilation) { var members = namedTypeSymbol.GetMembers(); var symbolBuilder = ImmutableArray.CreateBuilder(members.Length); @@ -373,7 +373,7 @@ private ImmutableArray GetInheritedMemberSymbols(INamedTypeSymbol named return symbolBuilder.ToImmutable(); } - private void AddOverriddenMembers(INamedTypeSymbol namedTypeSymbol, ref HashSet overriddenMembers) + private static void AddOverriddenMembers(INamedTypeSymbol namedTypeSymbol, ref HashSet overriddenMembers) { foreach (var member in namedTypeSymbol.GetMembers()) { @@ -539,7 +539,7 @@ public ImmutableHashSet> GetAssemblySet(Projec return set.ToImmutable(); } - private bool ContainsAccessibleTypeMember(INamespaceOrTypeSymbol namespaceOrTypeSymbol, IAssemblySymbol assemblySymbol) + private static bool ContainsAccessibleTypeMember(INamespaceOrTypeSymbol namespaceOrTypeSymbol, IAssemblySymbol assemblySymbol) { foreach (var typeMember in namespaceOrTypeSymbol.GetTypeMembers()) { @@ -568,7 +568,7 @@ private ImmutableArray GetAccessibleTypeMembers(INamespaceOrTy return builder.ToImmutable(); } - private bool IncludeTypeMember(INamedTypeSymbol typeMember, IAssemblySymbol assemblySymbol) + private static bool IncludeTypeMember(INamedTypeSymbol typeMember, IAssemblySymbol assemblySymbol) { if (!IncludeSymbol(typeMember)) { diff --git a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs index 787a7a83137e0..da976d077a15d 100644 --- a/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs +++ b/src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs @@ -505,7 +505,7 @@ protected override bool TryExec(Guid commandGroup, uint commandId) return false; } - private async Task FindReferencesAsync( + private static async Task FindReferencesAsync( IStreamingFindUsagesPresenter presenter, SymbolListItem symbolListItem, Project project) { try diff --git a/src/VisualStudio/Core/Def/Implementation/Log/VisualStudioErrorLogger.cs b/src/VisualStudio/Core/Def/Implementation/Log/VisualStudioErrorLogger.cs index 12d5567ca97eb..02fa5b5deaf86 100644 --- a/src/VisualStudio/Core/Def/Implementation/Log/VisualStudioErrorLogger.cs +++ b/src/VisualStudio/Core/Def/Implementation/Log/VisualStudioErrorLogger.cs @@ -34,7 +34,7 @@ public void LogException(object source, Exception exception) } } - private bool ShouldReportCrashDumps(object source) => HasRoslynPublicKey(source); + private static bool ShouldReportCrashDumps(object source) => HasRoslynPublicKey(source); private static string ToLogFormat(Exception exception) => exception.Message + Environment.NewLine + exception.StackTrace; diff --git a/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs b/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs index 8ae75996ce521..e6f5386ef8b4e 100644 --- a/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs +++ b/src/VisualStudio/Core/Def/Implementation/Options/RoamingVisualStudioProfileOptionPersister.cs @@ -215,7 +215,7 @@ public bool TryFetch(OptionKey optionKey, out object value) return true; } - private bool DeserializeCodeStyleOption(ref object value, Type type) + private static bool DeserializeCodeStyleOption(ref object value, Type type) { if (value is string serializedValue) { diff --git a/src/VisualStudio/Core/Def/Implementation/Preview/FileChange.cs b/src/VisualStudio/Core/Def/Implementation/Preview/FileChange.cs index 0bce58856d0a5..af5229b9d2f7c 100644 --- a/src/VisualStudio/Core/Def/Implementation/Preview/FileChange.cs +++ b/src/VisualStudio/Core/Def/Implementation/Preview/FileChange.cs @@ -128,7 +128,7 @@ private ChangeList GetEntireDocumentAsSpanChange(TextDocument document) return new ChangeList(new[] { entireSpanChild }); } - private string GetDisplayText(string excerpt) + private static string GetDisplayText(string excerpt) { if (excerpt.Contains("\r\n")) { diff --git a/src/VisualStudio/Core/Def/Implementation/Preview/TopLevelChange.cs b/src/VisualStudio/Core/Def/Implementation/Preview/TopLevelChange.cs index 4c10ce91661dc..86023c327dbfd 100644 --- a/src/VisualStudio/Core/Def/Implementation/Preview/TopLevelChange.cs +++ b/src/VisualStudio/Core/Def/Implementation/Preview/TopLevelChange.cs @@ -68,7 +68,7 @@ public Solution GetUpdatedSolution(bool applyingChanges) return solution; } - private Solution ApplyFileChanges(Solution solution, IEnumerable fileChanges, bool applyingChanges) + private static Solution ApplyFileChanges(Solution solution, IEnumerable fileChanges, bool applyingChanges) { foreach (var fileChange in fileChanges) { @@ -179,7 +179,7 @@ void ApplyFileChangesCore( } } - private Solution ApplyReferenceChanges(Solution solution, IEnumerable referenceChanges) + private static Solution ApplyReferenceChanges(Solution solution, IEnumerable referenceChanges) { foreach (var referenceChange in referenceChanges) { diff --git a/src/VisualStudio/Core/Def/Implementation/PreviewPane/PreviewPaneService.cs b/src/VisualStudio/Core/Def/Implementation/PreviewPane/PreviewPaneService.cs index 271ddd174a164..2cab39120471e 100644 --- a/src/VisualStudio/Core/Def/Implementation/PreviewPane/PreviewPaneService.cs +++ b/src/VisualStudio/Core/Def/Implementation/PreviewPane/PreviewPaneService.cs @@ -113,7 +113,7 @@ object IPreviewPaneService.GetPreviewPane(DiagnosticData data, IReadOnlyList (DeclarationModifiers)node[RoslynGraphProperties.SymbolModifiers]; - private bool CheckAccessibility(GraphNode node, Accessibility accessibility) + private static bool CheckAccessibility(GraphNode node, Accessibility accessibility) => node[RoslynGraphProperties.DeclaredAccessibility].Equals(accessibility); - private bool HasExplicitInterfaces(GraphNode node) + private static bool HasExplicitInterfaces(GraphNode node) => ((IList)node[RoslynGraphProperties.ExplicitInterfaceImplementations]).Count > 0; - private bool IsRoslynNode(GraphNode node) + private static bool IsRoslynNode(GraphNode node) { return node[RoslynGraphProperties.SymbolKind] != null && node[RoslynGraphProperties.TypeKind] != null; } - private bool IsAnySymbolKind(GraphNode node, params SymbolKind[] symbolKinds) + private static bool IsAnySymbolKind(GraphNode node, params SymbolKind[] symbolKinds) => symbolKinds.Any(k => k.Equals(node[RoslynGraphProperties.SymbolKind])); - private bool IsAnyTypeKind(GraphNode node, params TypeKind[] typeKinds) + private static bool IsAnyTypeKind(GraphNode node, params TypeKind[] typeKinds) => typeKinds.Any(k => node[RoslynGraphProperties.TypeKind].Equals(k)); private static readonly GraphCommandDefinition s_overridesCommandDefinition = diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/FileChangeWatcher.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/FileChangeWatcher.cs index 8462950d9a031..19a445bbbe3a5 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/FileChangeWatcher.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/FileChangeWatcher.cs @@ -281,7 +281,7 @@ public void StopWatchingFile(IFileWatchingToken token) _fileChangeWatcher.EnqueueWork(service => UnsubscribeFileChangeEventsAsync(service, typedToken)); } - private Task UnsubscribeFileChangeEventsAsync(IVsAsyncFileChangeEx service, FileWatchingToken typedToken) + private static Task UnsubscribeFileChangeEventsAsync(IVsAsyncFileChangeEx service, FileWatchingToken typedToken) => service.UnadviseFileChangeAsync(typedToken.Cookie!.Value); public event EventHandler? FileChanged; diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs index 3b4aef3a4d80c..15cd5608d6441 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs @@ -60,7 +60,7 @@ public Service(IThreadingContext threadingContext, VisualStudioWorkspace? worksp // full URI format (i.e. file://c:/...). This will allow us to get the // actual local in the normal path format. if (Uri.TryCreate(assembly.CodeBase, UriKind.RelativeOrAbsolute, out var uri) && - this.CanResolveType(assembly, fullyQualifiedTypeName)) + CanResolveType(assembly, fullyQualifiedTypeName)) { return uri.LocalPath; } @@ -69,7 +69,7 @@ public Service(IThreadingContext threadingContext, VisualStudioWorkspace? worksp return null; } - private bool CanResolveType(Assembly assembly, string? fullyQualifiedTypeName) + private static bool CanResolveType(Assembly assembly, string? fullyQualifiedTypeName) { if (fullyQualifiedTypeName == null) { diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioMetadataReferenceManager.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioMetadataReferenceManager.cs index 17e58146b5988..9b4404a7a6542 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioMetadataReferenceManager.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioMetadataReferenceManager.cs @@ -215,7 +215,7 @@ private void GetStorageInfoFromTemporaryStorage(FileKey moduleFileKey, out ITemp pImage = directAccess.GetPointer(); } - private void StreamCopy(Stream source, Stream destination, int start, int length) + private static void StreamCopy(Stream source, Stream destination, int start, int length) { source.Position = start; @@ -311,7 +311,7 @@ private bool TryGetFileMappingFromMetadataImporter(FileKey fileKey, [NotNullWhen /// /// - private AssemblyMetadata CreateAssemblyMetadata( + private static AssemblyMetadata CreateAssemblyMetadata( FileKey fileKey, ModuleMetadata manifestModule, List? storages, Func?, ModuleMetadata> moduleMetadataFactory) { diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs index ab0afa285c5bb..0fd9bac4f39ec 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs @@ -246,7 +246,7 @@ private bool TryUntrackClosingDocument(string moniker) return unregisteredRegistration; } - private bool IsClaimedByAnotherWorkspace(WorkspaceRegistration registration) + private static bool IsClaimedByAnotherWorkspace(WorkspaceRegistration registration) { // Currently, we are also responsible for pushing documents to the metadata as source workspace, // so we count that here as well @@ -357,7 +357,7 @@ private CompilationOptions GetCompilationOptionsWithScriptReferenceResolvers(Com .WithSourceReferenceResolver(new SourceFileResolver(scriptEnvironmentService.SourceReferenceSearchPaths, baseDirectory)); } - private SourceCodeKind GetSourceCodeKind( + private static SourceCodeKind GetSourceCodeKind( ParseOptions parseOptionsOpt, string fileExtension, LanguageInformation languageInformation) diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs index 73a1e9d3ed96d..e1b89d6a44270 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs @@ -503,7 +503,7 @@ internal bool TryAddReferenceToProject(ProjectId projectId, string assemblyName) return true; } - private string? GetAnalyzerPath(AnalyzerReference analyzerReference) + private static string? GetAnalyzerPath(AnalyzerReference analyzerReference) => analyzerReference.FullPath; protected override void ApplyCompilationOptionsChanged(ProjectId projectId, CompilationOptions options) @@ -584,7 +584,7 @@ protected override void ApplyAnalyzerReferenceRemoved(ProjectId projectId, Analy } } - private string? GetMetadataPath(MetadataReference metadataReference) + private static string? GetMetadataPath(MetadataReference metadataReference) { if (metadataReference is PortableExecutableReference fileMetadata) { @@ -850,7 +850,7 @@ private void AddDocumentCore(DocumentInfo info, SourceText initialText, TextDocu } } - private bool IsWebsite(EnvDTE.Project project) + private static bool IsWebsite(EnvDTE.Project project) => project.Kind == VsWebSite.PrjKind.prjKindVenusProject; private IEnumerable FilterFolderForProjectType(EnvDTE.Project project, IEnumerable folders) @@ -1253,7 +1253,7 @@ protected override void ApplyDocumentInfoChanged(DocumentId documentId, Document /// The currently supports only a subset of /// changes. /// - private void FailIfDocumentInfoChangesNotSupported(CodeAnalysis.Document document, DocumentInfo updatedInfo) + private static void FailIfDocumentInfoChangesNotSupported(CodeAnalysis.Document document, DocumentInfo updatedInfo) { if (document.SourceCodeKind != updatedInfo.SourceCodeKind) { diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectTelemetry/VisualStudioProjectTelemetryService.cs b/src/VisualStudio/Core/Def/Implementation/ProjectTelemetry/VisualStudioProjectTelemetryService.cs index 61b714b413b33..250d090e474e6 100644 --- a/src/VisualStudio/Core/Def/Implementation/ProjectTelemetry/VisualStudioProjectTelemetryService.cs +++ b/src/VisualStudio/Core/Def/Implementation/ProjectTelemetry/VisualStudioProjectTelemetryService.cs @@ -132,7 +132,7 @@ private async Task NotifyTelemetryServiceAsync( await Task.WhenAll(tasks).ConfigureAwait(false); } - private void AddFilteredData(ImmutableArray infos, ArrayBuilder filteredInfos) + private static void AddFilteredData(ImmutableArray infos, ArrayBuilder filteredInfos) { using var _ = PooledHashSet.GetInstance(out var seenProjectIds); @@ -147,7 +147,7 @@ private void AddFilteredData(ImmutableArray infos, ArrayBu } } - private void NotifyTelemetryService(ProjectTelemetryData info) + private static void NotifyTelemetryService(ProjectTelemetryData info) { try { diff --git a/src/VisualStudio/Core/Def/Implementation/PullMemberUp/MainDialog/PullMemberUpDialog.xaml.cs b/src/VisualStudio/Core/Def/Implementation/PullMemberUp/MainDialog/PullMemberUpDialog.xaml.cs index 1b831a4625140..269abfb11e3df 100644 --- a/src/VisualStudio/Core/Def/Implementation/PullMemberUp/MainDialog/PullMemberUpDialog.xaml.cs +++ b/src/VisualStudio/Core/Def/Implementation/PullMemberUp/MainDialog/PullMemberUpDialog.xaml.cs @@ -61,7 +61,7 @@ private void OKButton_Click(object sender, RoutedEventArgs e) } } - private bool ShowWarningDialog(PullMembersUpOptions result) + private static bool ShowWarningDialog(PullMembersUpOptions result) { var warningViewModel = new PullMemberUpWarningViewModel(result); var warningDialog = new PullMemberUpWarningDialog(warningViewModel); diff --git a/src/VisualStudio/Core/Def/Implementation/PullMemberUp/WarningDialog/PullMemberUpWarningViewModel.cs b/src/VisualStudio/Core/Def/Implementation/PullMemberUp/WarningDialog/PullMemberUpWarningViewModel.cs index 36ff54d4d6e1e..0130be8dd1eaa 100644 --- a/src/VisualStudio/Core/Def/Implementation/PullMemberUp/WarningDialog/PullMemberUpWarningViewModel.cs +++ b/src/VisualStudio/Core/Def/Implementation/PullMemberUp/WarningDialog/PullMemberUpWarningViewModel.cs @@ -20,7 +20,7 @@ internal class PullMemberUpWarningViewModel : AbstractNotifyPropertyChanged public PullMemberUpWarningViewModel(PullMembersUpOptions options) => WarningMessageContainer = GenerateMessage(options); - private ImmutableArray GenerateMessage(PullMembersUpOptions options) + private static ImmutableArray GenerateMessage(PullMembersUpOptions options) { var warningMessagesBuilder = ImmutableArray.CreateBuilder(); diff --git a/src/VisualStudio/Core/Def/Implementation/Snippets/AbstractSnippetExpansionClient.cs b/src/VisualStudio/Core/Def/Implementation/Snippets/AbstractSnippetExpansionClient.cs index 6090171e45c54..b2f9d5f31ea77 100644 --- a/src/VisualStudio/Core/Def/Implementation/Snippets/AbstractSnippetExpansionClient.cs +++ b/src/VisualStudio/Core/Def/Implementation/Snippets/AbstractSnippetExpansionClient.cs @@ -513,7 +513,7 @@ private void AddReferencesAndImports( AddReferences(documentWithImports.Project, snippetNode); } - private void AddReferences(Project originalProject, XElement snippetNode) + private static void AddReferences(Project originalProject, XElement snippetNode) { var referencesNode = snippetNode.Element(XName.Get("References", snippetNode.Name.NamespaceName)); if (referencesNode == null) diff --git a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs index 232ca5cb5d116..f04ccba88d90d 100644 --- a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs +++ b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs @@ -404,7 +404,7 @@ private string GetBuildTool(string buildTool) return _source.BuildTool; } - private ErrorSource GetErrorSource(string buildTool) + private static ErrorSource GetErrorSource(string buildTool) { if (buildTool == PredefinedBuildTools.Build) { @@ -414,7 +414,7 @@ private ErrorSource GetErrorSource(string buildTool) return ErrorSource.Other; } - private ErrorRank GetErrorRank(DiagnosticData item) + private static ErrorRank GetErrorRank(DiagnosticData item) { if (!item.Properties.TryGetValue(WellKnownDiagnosticPropertyNames.Origin, out var value)) { @@ -559,7 +559,7 @@ public bool TryCreateToolTip(int index, string columnName, [NotNullWhen(returnVa } #pragma warning disable IDE0060 // Remove unused parameter - TODO: remove this once we moved to new drop - public bool TryCreateStringContent(int index, string columnName, bool singleColumnView, [NotNullWhen(returnValue: true)] out string? content) + public static bool TryCreateStringContent(int index, string columnName, bool singleColumnView, [NotNullWhen(returnValue: true)] out string? content) #pragma warning restore IDE0060 // Remove unused parameter { content = null; diff --git a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs index 53d39f1fbc74f..4e43d3aab1c2f 100644 --- a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs +++ b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs @@ -224,7 +224,7 @@ public override bool TryNavigateTo(int index, bool previewTab, bool activate) TryNavigateTo(item.Workspace, documentId, item.GetOriginalPosition(), previewTab, activate); } - private DocumentId GetProperDocumentId(DiagnosticTableItem item) + private static DocumentId GetProperDocumentId(DiagnosticTableItem item) { var documentId = item.DocumentId; var projectId = item.ProjectId; diff --git a/src/VisualStudio/Core/Def/Implementation/TodoComments/VisualStudioTodoCommentsService.cs b/src/VisualStudio/Core/Def/Implementation/TodoComments/VisualStudioTodoCommentsService.cs index 87c2ef5d8a2f2..f37ba029da2de 100644 --- a/src/VisualStudio/Core/Def/Implementation/TodoComments/VisualStudioTodoCommentsService.cs +++ b/src/VisualStudio/Core/Def/Implementation/TodoComments/VisualStudioTodoCommentsService.cs @@ -185,7 +185,7 @@ private Task ProcessTodoCommentInfosAsync( return Task.CompletedTask; } - private void AddFilteredInfos( + private static void AddFilteredInfos( ImmutableArray array, ArrayBuilder filteredArray) { diff --git a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs index 94b825545d357..cb64c0473469f 100644 --- a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs +++ b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs @@ -307,7 +307,7 @@ private IEnumerable FilterTextChanges(SourceText originalText, List< } } - private bool WhitespaceOnEdges(TextSpan visibleTextSpan, TextChange change) + private static bool WhitespaceOnEdges(TextSpan visibleTextSpan, TextChange change) { if (!string.IsNullOrWhiteSpace(change.NewText)) { @@ -460,7 +460,7 @@ private bool TryGetWhitespaceGroup(string text, List groups) return true; } - private bool TextAt(string text, int index, char ch1, char ch2 = default) + private static bool TextAt(string text, int index, char ch1, char ch2 = default) { if (index < 0 || text.Length <= index) { @@ -481,7 +481,7 @@ private bool TextAt(string text, int index, char ch1, char ch2 = default) return false; } - private bool TryGetSubTextChange( + private static bool TryGetSubTextChange( SourceText originalText, TextSpan visibleSpanInOriginalText, string rightText, TextSpan spanInOriginalText, TextSpan spanInRightText, out TextChange textChange) { @@ -621,7 +621,7 @@ private static string GetReplacementStrings(string leftText, string rightText, s } } - private string GetTextWithReplacementMap(string text, string returnReplacement, string newLineReplacement, List> replacementMap) + private static string GetTextWithReplacementMap(string text, string returnReplacement, string newLineReplacement, List> replacementMap) { var delta = 0; var returnLength = returnReplacement.Length; @@ -652,7 +652,7 @@ private string GetTextWithReplacementMap(string text, string returnReplacement, return StringBuilderPool.ReturnAndFree(sb); } - private Span AdjustSpan(Span span, List> replacementMap) + private static Span AdjustSpan(Span span, List> replacementMap) { var start = span.Start; var end = span.End; @@ -899,7 +899,7 @@ private int GetBaseIndentation(SyntaxNode root, SourceText text, TextSpan span) return additionalIndentation; } - private TextSpan GetVisibleTextSpan(SourceText text, TextSpan visibleSpan, bool uptoFirstAndLastLine = false) + private static TextSpan GetVisibleTextSpan(SourceText text, TextSpan visibleSpan, bool uptoFirstAndLastLine = false) { var start = visibleSpan.Start; for (; start < visibleSpan.End; start++) @@ -1059,7 +1059,7 @@ private bool IsCodeBlock(ITextSnapshot surfaceSnapshot, int position, char ch) return false; } - private bool CheckCode(ITextSnapshot snapshot, int position, char ch, string tag, bool checkAt = true) + private static bool CheckCode(ITextSnapshot snapshot, int position, char ch, string tag, bool checkAt = true) { if (ch != tag[tag.Length - 1] || position < tag.Length) { diff --git a/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs index da6f5d3d00435..1c80a8d3b133c 100644 --- a/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs +++ b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs @@ -128,7 +128,7 @@ private bool ShouldDisableBackgroundAnalysis(long availableMemory) _workspace.Options.GetOption(InternalFeatureOnOffOptions.BackgroundAnalysisMemoryMonitor); } - private void DisableBackgroundAnalysis() + private static void DisableBackgroundAnalysis() { // Force low VM minimal background analysis for the current VS session. SolutionCrawlerOptions.LowMemoryForcedMinimalBackgroundAnalysis = true; diff --git a/src/VisualStudio/Core/Def/Implementation/VsRefactorNotifyService.cs b/src/VisualStudio/Core/Def/Implementation/VsRefactorNotifyService.cs index a4a623f4527f9..402a1b85e562b 100644 --- a/src/VisualStudio/Core/Def/Implementation/VsRefactorNotifyService.cs +++ b/src/VisualStudio/Core/Def/Implementation/VsRefactorNotifyService.cs @@ -153,7 +153,7 @@ private bool TryGetItemIDsAndRQName( return true; } - private bool TryGetRenamingRQNameForSymbol(ISymbol symbol, out string rqname) + private static bool TryGetRenamingRQNameForSymbol(ISymbol symbol, out string rqname) { if (symbol.Kind == SymbolKind.Method) { diff --git a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioDocumentNavigationService.cs b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioDocumentNavigationService.cs index 210c2a09b0717..39714f6cd9b05 100644 --- a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioDocumentNavigationService.cs +++ b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioDocumentNavigationService.cs @@ -419,7 +419,7 @@ public bool NavigateTo(ITextBuffer textBuffer, VsTextSpan vsTextSpan) } } - private bool IsSecondaryBuffer(Workspace workspace, DocumentId documentId) + private static bool IsSecondaryBuffer(Workspace workspace, DocumentId documentId) { if (!(workspace is VisualStudioWorkspaceImpl visualStudioWorkspace)) { @@ -435,10 +435,10 @@ private bool IsSecondaryBuffer(Workspace workspace, DocumentId documentId) return true; } - private bool CanMapFromSecondaryBufferToPrimaryBuffer(Workspace workspace, DocumentId documentId, VsTextSpan spanInSecondaryBuffer) + private static bool CanMapFromSecondaryBufferToPrimaryBuffer(Workspace workspace, DocumentId documentId, VsTextSpan spanInSecondaryBuffer) => spanInSecondaryBuffer.TryMapSpanFromSecondaryBufferToPrimaryBuffer(workspace, documentId, out _); - private IDisposable OpenNewDocumentStateScope(OptionSet options) + private static IDisposable OpenNewDocumentStateScope(OptionSet options) { var state = options.GetOption(NavigationOptions.PreferProvisionalTab) ? __VSNEWDOCUMENTSTATE.NDS_Provisional diff --git a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioFormattingRuleFactoryServiceFactory.cs b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioFormattingRuleFactoryServiceFactory.cs index 504977b6f1499..ecc2fa0e64bb3 100644 --- a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioFormattingRuleFactoryServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioFormattingRuleFactoryServiceFactory.cs @@ -42,7 +42,7 @@ public bool ShouldUseBaseIndentation(Document document) public bool ShouldNotFormatOrCommitOnPaste(Document document) => IsContainedDocument(document); - private bool IsContainedDocument(Document document) + private static bool IsContainedDocument(Document document) { var visualStudioWorkspace = document.Project.Solution.Workspace as VisualStudioWorkspaceImpl; return visualStudioWorkspace?.TryGetContainedDocument(document.Id) != null; diff --git a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs index 89955807b932d..9262cce9f165d 100644 --- a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs @@ -590,7 +590,7 @@ public ImmutableArray GetInstalledVersions(string packageName) return versionsAndSplits.Select(v => v.Version).ToImmutableArray(); } - private int CompareSplit(string[] split1, string[] split2) + private static int CompareSplit(string[] split1, string[] split2) { ThisCanBeCalledOnAnyThread(); diff --git a/src/VisualStudio/Core/Def/RoslynPackage.cs b/src/VisualStudio/Core/Def/RoslynPackage.cs index 8269895e599f1..672c8bdb949a8 100644 --- a/src/VisualStudio/Core/Def/RoslynPackage.cs +++ b/src/VisualStudio/Core/Def/RoslynPackage.cs @@ -246,7 +246,7 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - private void ReportSessionWideTelemetry() + private static void ReportSessionWideTelemetry() { PersistedVersionStampLogger.ReportTelemetry(); LinkedFileDiffMergingLogger.ReportTelemetry(); diff --git a/src/VisualStudio/Core/Def/Shared/VisualStudioImageMonikerService.cs b/src/VisualStudio/Core/Def/Shared/VisualStudioImageMonikerService.cs index 20b0e2d824c20..53ee67f3de10c 100644 --- a/src/VisualStudio/Core/Def/Shared/VisualStudioImageMonikerService.cs +++ b/src/VisualStudio/Core/Def/Shared/VisualStudioImageMonikerService.cs @@ -75,7 +75,7 @@ private ImageMoniker GetImageMoniker(ImmutableArray tags) return glyph.GetImageMoniker(); } - private ImageCompositionLayer CreateLayer( + private static ImageCompositionLayer CreateLayer( ImageMoniker imageMoniker, int virtualWidth = 16, int virtualYOffset = 0,