34 writes to Scope
Microsoft.Extensions.AI.Abstractions (3)
Files\HostedFileClientExtensions.cs (1)
161options.Scope = scope;
Files\HostedFileClientOptions.cs (1)
34Scope = other.Scope;
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileClientOptions.g.cs (1)
61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.HostedFileClientOptions)obj).Scope = value!,
Microsoft.Extensions.AI.Abstractions.Tests (4)
Files\HostedFileClientExtensionsTests.cs (1)
342var explicitOptions = new HostedFileClientOptions { Scope = "container-from-options" };
Files\HostedFileClientOptionsTests.cs (2)
41Scope = "container-1", 133Scope = "container-1",
Generated\361d1da7f942c932\TestJsonSerializerContext.HostedFileClientOptions.g.cs (1)
59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.HostedFileClientOptions)obj).Scope = value!,
Microsoft.Extensions.AI.OpenAI.Tests (22)
OpenAIHostedFileClientIntegrationTests.cs (8)
302new HostedFileClientOptions { Scope = containerId }); 310await foreach (var file in containerClient.ListFilesAsync(new HostedFileClientOptions { Scope = containerId })) 318var fileInfo = await containerClient.GetFileInfoAsync(uploadedFile.FileId, new HostedFileClientOptions { Scope = containerId }); 323using var downloadStream = await containerClient.DownloadAsync(uploadedFile.FileId, new HostedFileClientOptions { Scope = containerId }); 330bool deleted = await containerClient.DeleteAsync(uploadedFile.FileId, new HostedFileClientOptions { Scope = containerId }); 368await foreach (var file in fileClient.ListFilesAsync(new HostedFileClientOptions { Scope = containerId })) 377using var downloadStream = await fileClient.DownloadAsync(firstFile, new HostedFileClientOptions { Scope = containerId }); 419new HostedFileClientOptions { Scope = containerId });
OpenAIHostedFileClientTests.cs (14)
383() => client.UploadAsync(stream, options: new HostedFileClientOptions { Scope = "container-123" })); 393() => client.DownloadAsync("file-abc123", new HostedFileClientOptions { Scope = "container-123" })); 403() => client.GetFileInfoAsync("file-abc123", new HostedFileClientOptions { Scope = "container-123" })); 413async () => await CollectAsync(client.ListFilesAsync(new HostedFileClientOptions { Scope = "container-123" }))); 423() => client.DeleteAsync("file-abc123", new HostedFileClientOptions { Scope = "container-123" })); 662var result = await client.UploadAsync(contentStream, "text/csv", "data.csv", new HostedFileClientOptions { Scope = "ctr-123" }); 687await client.UploadAsync(contentStream, "text/csv", "data.csv", new HostedFileClientOptions { Scope = "ctr-123" }); 716using var stream = await client.DownloadAsync("cfile-1", new HostedFileClientOptions { Scope = "ctr-123" }); 743var result = await client.GetFileInfoAsync("cfile-1", new HostedFileClientOptions { Scope = "ctr-123" }); 758var result = await client.GetFileInfoAsync("cfile-nonexistent", new HostedFileClientOptions { Scope = "ctr-123" }); 785var files = await CollectAsync(client.ListFilesAsync(new HostedFileClientOptions { Scope = "ctr-123" })); 809var result = await client.DeleteAsync("cfile-1", new HostedFileClientOptions { Scope = "ctr-123" }); 821var result = await client.DeleteAsync("cfile-nonexistent", new HostedFileClientOptions { Scope = "ctr-123" }); 874Scope = "ctr-123",
Microsoft.Extensions.AI.Tests (5)
Files\OpenTelemetryHostedFileClientTests.cs (5)
51await client.UploadAsync(stream, "text/plain", "test.txt", new HostedFileClientOptions { Purpose = "assistants", Scope = "container-1" }); 103using var stream = await client.DownloadAsync("file-xyz", new HostedFileClientOptions { Scope = "container-2" }); 143await client.GetFileInfoAsync("file-info", new HostedFileClientOptions { Scope = "container-3" }); 198await foreach (var file in client.ListFilesAsync(new HostedFileClientOptions { Purpose = "assistants", Scope = "container-4" })) 239await client.DeleteAsync("file-del", new HostedFileClientOptions { Scope = "container-5" });
22 references to Scope
Microsoft.Extensions.AI (5)
Files\OpenTelemetryHostedFileClient.cs (5)
156if (options?.Scope is string scope) 209if (options?.Scope is string scope) 246if (options?.Scope is string scope) 295if (options?.Scope is string scope) 373if (options?.Scope is string scope)
Microsoft.Extensions.AI.Abstractions (4)
Files\HostedFileClientExtensions.cs (1)
158if (hostedFile.Scope is string scope && options?.Scope is null)
Files\HostedFileClientOptions.cs (1)
34Scope = other.Scope;
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileClientOptions.g.cs (2)
60Getter = static obj => ((global::Microsoft.Extensions.AI.HostedFileClientOptions)obj).Scope, 168string __value_Scope = ((global::Microsoft.Extensions.AI.HostedFileClientOptions)value).Scope;
Microsoft.Extensions.AI.Abstractions.Tests (9)
Files\HostedFileClientExtensionsTests.cs (2)
335Assert.Equal("container-42", capturedOptions.Scope); 355Assert.Equal("container-from-options", capturedOptions.Scope);
Files\HostedFileClientOptionsTests.cs (5)
20Assert.Null(options.Scope); 27Assert.Null(clone.Scope); 48Assert.Equal("container-1", options.Scope); 55Assert.Equal("container-1", clone.Scope); 144Assert.Equal("container-1", deserialized.Scope);
Generated\361d1da7f942c932\TestJsonSerializerContext.HostedFileClientOptions.g.cs (2)
58Getter = static obj => ((global::Microsoft.Extensions.AI.HostedFileClientOptions)obj).Scope, 166string __value_Scope = ((global::Microsoft.Extensions.AI.HostedFileClientOptions)value).Scope;
Microsoft.Extensions.AI.OpenAI (4)
OpenAIClientExtensions.cs (1)
202/// in the <see cref="HostedFileClientOptions.Scope"/> property.
OpenAIHostedFileClient.cs (3)
34/// When a <see cref="HostedFileClientOptions.Scope"/> (container ID) is specified on a per-call options object 86/// provided via the <see cref="HostedFileClientOptions.Scope"/> property on per-call options. 375options?.Scope ?? _defaultScope;