417 references to AsMemory
aspire (1)
Aspire.Hosting (1)
GenerateDocumentationAndConfigFiles (11)
Program.cs (11)
277await Console.Error.WriteLineAsync($"'{path}' does not exist".AsMemory(), cancellationToken).ConfigureAwait(false);
378await Console.Out.WriteLineAsync($"Failed to create analyzer rules missing documentation file. Http response timed out".AsMemory(), cancellationToken).ConfigureAwait(false);
384await Console.Error.WriteLineAsync("One or more auto-generated documentation files were either edited manually, or not updated. Please revert changes made to the following files (if manually edited) and run `dotnet msbuild /t:pack` at the root of the repo to automatically update them:".AsMemory(), cancellationToken).ConfigureAwait(false);
821await Console.Error.WriteLineAsync($"Missing entry in {fileWithPath}".AsMemory(), cancellationToken).ConfigureAwait(false);
822await Console.Error.WriteLineAsync(line.AsMemory(), cancellationToken).ConfigureAwait(false);
877await Console.Error.WriteLineAsync($"'{assemblyPath}' does not exist".AsMemory(), cancellationToken).ConfigureAwait(false);
889await Console.Error.WriteLineAsync(ex.Message.AsMemory(), cancellationToken).ConfigureAwait(false);
915await Console.Error.WriteLineAsync($"Expected both '{shippedFile}' and '{unshippedFile}' to exist or not exist, but '{existingFile}' exists and '{nonExistingFile}' does not exist.".AsMemory(), cancellationToken).ConfigureAwait(false);
925await Console.Error.WriteLineAsync($"'{shippedFile}' exists but was not expected".AsMemory(), cancellationToken).ConfigureAwait(false);
954await Console.Error.WriteLineAsync(ex.Message.AsMemory(), cancellationToken).ConfigureAwait(false);
962await Console.Error.WriteLineAsync($"Could not find any 'AnalyzerReleases.Shipped.md' file".AsMemory(), cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (2)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.Build (7)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (22)
Microsoft.CodeAnalysis.CSharp (27)
CommandLine\CSharpCommandLineParser.cs (4)
177ParseFileArgument(arg.AsMemory(), baseDirectory, filePathBuilder, diagnostics);
1370ParseSeparatedFileArgument(value.AsMemory(), baseDirectory, filePathBuilder, diagnostics);
1454ParseAndResolveReferencePaths(null, additionalReferenceDirectories.AsMemory(), baseDirectory, libPaths, MessageID.IDS_LIB_ENV, diagnostics);
1784ParseConditionalCompilationSymbols(value.AsMemory(), builder, out diagnostics);
Symbols\Source\SourceMemberContainerSymbol.cs (13)
1486symbols.ToDictionary(s => s.Name.AsMemory(), ReadOnlyMemoryOfCharComparer.Instance) :
1627if (GetMembersByName().TryGetValue(name.AsMemory(), out members))
1708return GetEarlyAttributeDecodingMembersDictionary().TryGetValue(name.AsMemory(), out result) ? result : ImmutableArray<Symbol>.Empty;
1754{ symbol.Name.AsMemory(), ImmutableArray.Create(symbol) },
1771ImmutableArrayExtensions.AddToMultiValueDictionaryBuilder(accumulator, item.Name.AsMemory(), item);
2525if (membersByName.ContainsKey(indexerName.AsMemory()))
2529Debug.Assert(!membersByName[indexerName.AsMemory()].Any(SymbolExtensions.IsIndexer));
2964if (membersByName.TryGetValue(operatorName1.AsMemory(), out ImmutableArray<Symbol> candidates))
3762(member.IsIndexer() ? WellKnownMemberNames.Indexer : member.Name).AsMemory(),
4201Debug.Assert(pair.Key.Equals(WellKnownMemberNames.InstanceConstructorName.AsMemory()));
4569foreach (var symbol in membersByName.TryGetValue(accessorName.AsMemory(), out var members) ? members : [])
4608foreach (var symbol in membersByName.TryGetValue(accessorName.AsMemory(), out var members) ? members : [])
5490if (memberNames.Contains(symbol.Name) || this.GetTypeMembersDictionary().ContainsKey(symbol.Name.AsMemory()))
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.Features (4)
Microsoft.CodeAnalysis.Razor.Compiler (47)
Language\Components\TypeNameHelper.cs (21)
16"bool".AsMemory(),
17"int".AsMemory(),
18"string".AsMemory(),
19"float".AsMemory(),
20"double".AsMemory(),
21"decimal".AsMemory(),
22"byte".AsMemory(),
23"short".AsMemory(),
24"long".AsMemory(),
25"char".AsMemory(),
26"object".AsMemory(),
27"dynamic".AsMemory(),
28"uint".AsMemory(),
29"ushort".AsMemory(),
30"ulong".AsMemory(),
31"sbyte".AsMemory(),
32"nint".AsMemory(),
33"nuint".AsMemory(),
63if (PredefinedTypeNames.Contains(typeName.AsMemory()))
78WriteGloballyQualifiedName(codeWriter, typeName.AsMemory());
130var memory = typeName.AsMemory();
Microsoft.CodeAnalysis.Workspaces (3)
Microsoft.Data.Analysis (2)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Evaluation.NLP (1)
Microsoft.Extensions.DataIngestion (1)
Microsoft.ML.AutoML.Tests (5)
Microsoft.ML.Core (3)
Microsoft.ML.Core.Tests (19)
Microsoft.ML.Data (91)
Data\Conversion.cs (15)
940public void Convert(in I1 src, ref TX dst) => dst = src.ToString().AsMemory();
941public void Convert(in I2 src, ref TX dst) => dst = src.ToString().AsMemory();
942public void Convert(in I4 src, ref TX dst) => dst = src.ToString().AsMemory();
943public void Convert(in I8 src, ref TX dst) => dst = src.ToString().AsMemory();
944public void Convert(in U1 src, ref TX dst) => dst = src.ToString().AsMemory();
945public void Convert(in U2 src, ref TX dst) => dst = src.ToString().AsMemory();
946public void Convert(in U4 src, ref TX dst) => dst = src.ToString().AsMemory();
947public void Convert(in U8 src, ref TX dst) => dst = src.ToString().AsMemory();
948public void Convert(in UG src, ref TX dst) => dst = string.Format("0x{0:x16}{1:x16}", src.High, src.Low).AsMemory();
949public void Convert(in R4 src, ref TX dst) => dst = src.ToString("G7", CultureInfo.InvariantCulture).AsMemory();
950public void Convert(in R8 src, ref TX dst) => dst = src.ToString("G17", CultureInfo.InvariantCulture).AsMemory();
951public void Convert(in BL src, ref TX dst) => dst = src.ToString().AsMemory();
952public void Convert(in TS src, ref TX dst) => dst = string.Format("{0:c}", src).AsMemory();
953public void Convert(in DT src, ref TX dst) => dst = string.Format("{0:o}", src).AsMemory();
954public void Convert(in DZ src, ref TX dst) => dst = string.Format("{0:o}", src).AsMemory();
Microsoft.ML.EntryPoints (1)
Microsoft.ML.FastTree (3)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.Parquet (4)
Microsoft.ML.PerformanceTests (3)
Microsoft.ML.Samples (1)
Microsoft.ML.TensorFlow (4)
Microsoft.ML.TestFramework (19)
TestSparseDataView.cs (12)
40GenericSparseDataView(new ReadOnlyMemory<char>[] { "a".AsMemory(), "b".AsMemory(), "c".AsMemory() },
41new ReadOnlyMemory<char>[] { "aa".AsMemory(), "bb".AsMemory(), "cc".AsMemory() });
80GenericDenseDataView(new ReadOnlyMemory<char>[] { "a".AsMemory(), "b".AsMemory(), "c".AsMemory() },
81new ReadOnlyMemory<char>[] { "aa".AsMemory(), "bb".AsMemory(), "cc".AsMemory() });
Microsoft.ML.Tests (27)
SvmLightTests.cs (9)
81new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(5, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
109new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(5, 0, new float[0], new int[0]), Comment = " A comment! 2:3".AsMemory() },
138new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
162AnnotationUtils.Kinds.SlotNames, new VBuffer<ReadOnlyMemory<char>>(3, new[] { "aurora".AsMemory(), "beachwood".AsMemory(), "chagrin".AsMemory() }),
311new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
468new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
495new SvmLightOutput() { Label = 1, Weight = 1, Features = new VBuffer<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
Transformers\HashTests.cs (4)
295HashTestCore("".AsMemory(), TextDataViewType.Instance, 0, 0, 0, 0, 0);
296HashTestCore("hello".AsMemory(), TextDataViewType.Instance, 940, 951, 857, 770, 0);
331new HashData {Foo = "alibaba".AsMemory()},
332new HashData {Foo = "ba ba".AsMemory()},
Transformers\ValueMappingTests.cs (12)
93var keys = new List<ReadOnlyMemory<char>>() { "foo".AsMemory(), "bar".AsMemory(), "test".AsMemory(), "wahoo".AsMemory() };
571Assert.Equal("foo2".AsMemory(), dValue);
581Assert.Contains("foo1".AsMemory(), allowedKeyPool);
582Assert.Contains("foo2".AsMemory(), allowedKeyPool);
583Assert.Contains("foo3".AsMemory(), allowedKeyPool);
634new KeyValuePair<ReadOnlyMemory<char>,int>("foo".AsMemory(), 1),
635new KeyValuePair<ReadOnlyMemory<char>,int>("bar".AsMemory(), 2),
636new KeyValuePair<ReadOnlyMemory<char>,int>("test".AsMemory(), 3),
637new KeyValuePair<ReadOnlyMemory<char>,int>("wahoo".AsMemory(), 4)
Microsoft.ML.TimeSeries (7)
Microsoft.ML.TorchSharp (6)
Microsoft.ML.Transforms (32)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (5)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (12)
Microsoft.NET.StringTools (1)
NuGet.Packaging (6)
System.CommandLine (1)
System.Memory (1)
System.Private.CoreLib (8)
System.Text.Json (1)
System.Text.RegularExpressions (8)
System\Text\RegularExpressions\RegexReplacement.cs (6)
132rule >= 0 ? _strings[rule].AsMemory() : // string lookup
139WholeString => match.Text.AsMemory(),
164rule >= 0 ? _strings[rule].AsMemory() : // string lookup
171WholeString => match.Text.AsMemory(),
232var state = (input, replacement, offsetAndCounts: new StructListBuilder<int>(), inputMemory: input.AsMemory(), prevat: 0, count);
298var state = (replacement: this, segments: new StructListBuilder<ReadOnlyMemory<char>>(), inputMemory: input.AsMemory(), prevat: 0, count);