119 references to AsReadOnly
dotnet-svcutil-lib (7)
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (2)
128return policies.AsReadOnly(); 282return temp.AsReadOnly();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
531return policies.AsReadOnly();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (1)
249return new RequestSecurityTokenResponseCollection(rstrCollection.AsReadOnly(), this.StandardsManager);
Shared\ProjectDependency.cs (3)
29private static readonly IReadOnlyList<string> s_binaryExtensions = new List<string> { ".exe", ".dll" }.AsReadOnly(); 30private static readonly IReadOnlyList<string> s_projectExtensions = new List<string> { ".csproj", ".vbproj", ".fsproj", ".vcxproj", ".esproj" }.AsReadOnly(); 31private static readonly IReadOnlyList<string> s_exeExtensions = new List<string> { ".exe" }.AsReadOnly();
Microsoft.AspNetCore.Authorization (2)
AuthorizationPolicy.cs (2)
38Requirements = new List<IAuthorizationRequirement>(requirements).AsReadOnly(); 39AuthenticationSchemes = new List<string>(authenticationSchemes).AsReadOnly();
Microsoft.AspNetCore.DataProtection (4)
KeyManagement\XmlKeyManager.cs (1)
168return processed.OfType<IKey>().ToList().AsReadOnly();
Repositories\EphemeralXmlRepository.cs (1)
32return GetAllElementsCore().ToList().AsReadOnly();
Repositories\FileSystemXmlRepository.cs (1)
72return GetAllElementsCore().ToList().AsReadOnly();
Repositories\RegistryXmlRepository.cs (1)
59return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (1)
EntityFrameworkCoreXmlRepository.cs (1)
44return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (1)
RedisXmlRepository.cs (1)
35return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.HostFiltering (1)
MiddlewareConfigurationManager.cs (1)
58return new(false, options.AllowEmptyHosts, options.IncludeFailureMessage, allowedHosts.AsReadOnly());
Microsoft.AspNetCore.Http.Connections.Tests (1)
src\SignalR\common\Shared\EphemeralDataProtectionProvider.cs (1)
22 return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.Http.Extensions (1)
src\Shared\PropertyAsParameterInfo.cs (1)
184return attributes.AsReadOnly();
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (1)
242Constraints = constraints.AsReadOnly(),
src\Shared\PropertyAsParameterInfo.cs (1)
184return attributes.AsReadOnly();
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
100public IReadOnlyList<WebApplicationFactory<TEntryPoint>> Factories => _derivedFactories.AsReadOnly();
Microsoft.AspNetCore.OpenApi (1)
src\Shared\PropertyAsParameterInfo.cs (1)
184return attributes.AsReadOnly();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
src\SignalR\common\Shared\EphemeralDataProtectionProvider.cs (1)
22 return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MessagePackHubProtocolTests.cs (1)
19var result = Write(CompletionMessage.WithResult("0", new List<int> { 42 }.AsReadOnly()));
Microsoft.AspNetCore.SignalR.Tests (1)
src\SignalR\common\Shared\EphemeralDataProtectionProvider.cs (1)
22 return GetAllElementsCore().ToList().AsReadOnly();
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
363builder.Services.AddSingleton<IServer>(new MockAddressesServer(new List<string>().AsReadOnly()));
Microsoft.Build (9)
BackEnd\Components\SdkResolution\SdkResolverService.cs (4)
426_generalResolversManifestsRegistry = generalResolversManifestsRegistry.AsReadOnly(); 427_specificResolversManifestsRegistry = specificResolversManifestsRegistry.AsReadOnly(); 524_specificResolversManifestsRegistry = specificResolversManifestsRegistry.AsReadOnly(); 525_generalResolversManifestsRegistry = generalResolversManifestsRegistry.AsReadOnly();
Construction\Solution\ProjectInSolution.cs (1)
220public IReadOnlyList<string> Dependencies => _dependenciesAsReadonly ?? (_dependenciesAsReadonly = _dependencies.AsReadOnly());
Construction\Solution\SolutionFile.cs (2)
202public IReadOnlyList<ProjectInSolution> ProjectsInOrder => _projectsInOrder.AsReadOnly(); 265public IReadOnlyList<SolutionConfigurationInSolution> SolutionConfigurations => _solutionConfigurationsByFullName.Values.ToList().AsReadOnly();
Instance\ProjectInstance.cs (2)
3244ImportPaths = importPaths.AsReadOnly(); 3257ImportPathsIncludingDuplicates = importPathsIncludingDuplicates.AsReadOnly();
Microsoft.Build.Engine.UnitTests (1)
BackEnd\SdkResolverService_Tests.cs (1)
733_fakeManifestRegistry = manifests.AsReadOnly();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
NavigateTo\NavigateToItemDisplay.cs (2)
63return new List<DescriptionItem>().AsReadOnly(); 102return items.AsReadOnly();
Microsoft.CodeAnalysis.Test.Utilities (3)
Assert\EqualityUnit`1.cs (2)
46EqualValues.Concat(equalValues).ToList().AsReadOnly(), 55NotEqualValues.Concat(notEqualValues).ToList().AsReadOnly());
Assert\EqualityUtil`1.cs (1)
31_equalityUnits = equalityUnits.ToList().AsReadOnly();
Microsoft.DotNet.Helix.JobSender (1)
JobDefinition.cs (1)
30WorkItems = _workItems.AsReadOnly();
Microsoft.DotNet.XliffTasks (1)
Model\TranslatableDocument.cs (1)
33Nodes = GetTranslatableNodes().ToList().AsReadOnly();
Microsoft.Maui.Controls (4)
LegacyLayouts\Layout.cs (1)
194 IReadOnlyList<Maui.IVisualTreeElement> IVisualTreeElement.GetVisualChildren() => Children.ToList().AsReadOnly();
NavigationModel.cs (1)
39 get { return _modalStack.AsReadOnly(); }
TableView\TableSection.cs (1)
159 IReadOnlyList<Maui.IVisualTreeElement> IVisualTreeElement.GetVisualChildren() => this._children.Cast<IVisualTreeElement>().ToList().AsReadOnly();
Window\Window.cs (1)
82 public IReadOnlyCollection<IWindowOverlay> Overlays => _overlays.ToList().AsReadOnly();
Microsoft.ML.Data (4)
Evaluators\Metrics\ConfusionMatrix.cs (3)
85PredictedClassesIndicators = labelNames.AsReadOnly(); 91counts.Add(confusionTableCounts[i].ToList().AsReadOnly()); 93Counts = counts.AsReadOnly();
Transforms\ExtensionsCatalog.cs (1)
49infos.Select(info => new InputOutputColumnPair(info.outputColumnName, info.inputColumnName)).ToList().AsReadOnly();
Microsoft.ML.StandardTrainers (1)
Optimizer\LearningRateScheduler.cs (1)
86return lrs.AsReadOnly();
PresentationFramework (27)
MS\Internal\Annotations\TextAnchor.cs (1)
562return _segments.AsReadOnly();
System\Windows\Controls\SelectedCellsChangedEventArgs.cs (2)
25_addedCells = addedCells.AsReadOnly(); 26_removedCells = removedCells.AsReadOnly();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (3)
186return result.AsReadOnly(); 311return result.AsReadOnly(); 553= new List<ResourceDictionaryInfo>().AsReadOnly();
System\Windows\Documents\MsSpellCheckLib\SpellChecker\OptionDescription.cs (1)
37return _labels.AsReadOnly();
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellingError.cs (1)
61return _suggestions.AsReadOnly();
System\Windows\Documents\NLGSpellerInterop.cs (4)
581_suggestions = suggestions.AsReadOnly(); 613_suggestions = suggestions.AsReadOnly(); 635_subSegments = subSegments.AsReadOnly(); 843_segments = segments.AsReadOnly();
System\Windows\Documents\Serialization\SerializerProvider.cs (1)
60_installedSerializers = installedSerializers.AsReadOnly();
System\Windows\Documents\WinRTSpellerInterop.cs (4)
905_empty = new List<ISpellerSegment>().AsReadOnly(); 919_suggestions = result.AsReadOnly(); 932_suggestions = result.AsReadOnly(); 945_suggestions = result.AsReadOnly();
System\Windows\Documents\WinRTSpellerInteropExtensions.cs (1)
136return allTokens.AsReadOnly();
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
81result = resultList.AsReadOnly();
System\Windows\Shell\JumpList.cs (6)
70RejectedItems = new List<JumpItem>(rejectedItems).AsReadOnly(); 71RejectionReasons = new List<JumpItemRejectionReason>(reasons).AsReadOnly(); 75RejectedItems = new List<JumpItem>().AsReadOnly(); 76RejectionReasons = new List<JumpItemRejectionReason>().AsReadOnly(); 97RemovedItems = new List<JumpItem>(removedItems).AsReadOnly(); 101RemovedItems = new List<JumpItem>().AsReadOnly();
System\Windows\SystemResources.cs (2)
218return dictionaries.AsReadOnly(); 249return dictionaries.AsReadOnly();
ReachFramework (17)
PrintConfig\PrtCap_Public_Simple.cs (17)
232_collationCap = valueSet.AsReadOnly(); 265_deviceFontCap = valueSet.AsReadOnly(); 298_duplexingCap = valueSet.AsReadOnly(); 353_inputBinCap = valueSet.AsReadOnly(); 449_outputColorCap = valueSet.AsReadOnly(); 482_outputQualityCap = valueSet.AsReadOnly(); 515_pageBorderlessCap = valueSet.AsReadOnly(); 589_pageMediaSizeCap = mediaSet.AsReadOnly(); 622_pageMediaTypeCap = valueSet.AsReadOnly(); 655_pageOrderCap = valueSet.AsReadOnly(); 688_pageOrientationCap = valueSet.AsReadOnly(); 728_pageResolutionCap = resSet.AsReadOnly(); 830_pagesPerSheetCap = valueSet.AsReadOnly(); 866_pagesPerSheetDirectionCap = valueSet.AsReadOnly(); 899_photoIntentCap = valueSet.AsReadOnly(); 931_staplingCap = valueSet.AsReadOnly(); 964_ttFontCap = valueSet.AsReadOnly();
SignalR.Client.FunctionalTestApp (1)
src\SignalR\common\Shared\EphemeralDataProtectionProvider.cs (1)
22 return GetAllElementsCore().ToList().AsReadOnly();
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\CompositionBatch.cs (4)
49_readOnlyPartsToAdd = _partsToAdd.AsReadOnly(); 63_readOnlyPartsToRemove = _partsToRemove.AsReadOnly(); 117_readOnlyPartsToAdd = _partsToAdd.AsReadOnly(); 141_readOnlyPartsToRemove = _partsToRemove.AsReadOnly();
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\ActivitySource.cs (1)
48Tags = tagList.AsReadOnly();
System\Diagnostics\Metrics\Meter.cs (1)
86Tags = tagList.AsReadOnly();
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
86argList = newArgs.AsReadOnly();
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ClassDataContract.cs (1)
76public override ReadOnlyCollection<DataMember> DataMembers => (Members == null) ? ReadOnlyCollection<DataMember>.Empty : Members.AsReadOnly();
System\Runtime\Serialization\EnumDataContract.cs (1)
56public override ReadOnlyCollection<DataMember> DataMembers => (Members == null) ? ReadOnlyCollection<DataMember>.Empty : Members.AsReadOnly();
System.Private.Xml (2)
System\Xml\Xsl\Xslt\XslAst.cs (1)
105private static readonly IList<XslNode> s_emptyList = new List<XslNode>().AsReadOnly();
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (1)
57private static readonly IList<V> s_empty = (new List<V>()).AsReadOnly();
System.Runtime.Caching (2)
System\Runtime\Caching\HostFileChangeMonitor.cs (1)
194return newList.AsReadOnly();
System\Runtime\Caching\MemoryCache.cs (1)
444return new MemoryCacheEntryChangeMonitor(keysClone.AsReadOnly(), regionName, this);
System.Security.Cryptography (1)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
298return _bags.AsReadOnly();
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
298return _bags.AsReadOnly();
System.ServiceModel.Syndication (1)
System\ServiceModel\Syndication\ResourceCollectionInfo.cs (1)
128s_singleEmptyAccept ??= new List<string>(1) { string.Empty }.AsReadOnly();
System.Xaml (6)
System\Xaml\Schema\XamlDirective.cs (1)
49_xamlNamespaces = nsList.AsReadOnly();
System\Xaml\Schema\XamlNamespace.cs (1)
233return xamlTypeList.AsReadOnly();
System\Xaml\XamlSchemaContext.cs (2)
938return combinedList.AsReadOnly(); 1050result = list.AsReadOnly();
System\Xaml\XamlType.cs (2)
745return result.AsReadOnly(); 1592return new List<XamlType>(typeArguments).AsReadOnly();