Skip to content

Commit

Permalink
STG 87 Arch Board Comments (#34331)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcc-msft authored Feb 22, 2023
1 parent d167361 commit df8d71c
Show file tree
Hide file tree
Showing 24 changed files with 204 additions and 235 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static BlobsClientBuilder GetNewBlobsClientBuilder(TenantConfigurationBui
(uri, clientOptions) => new BlobServiceClient(uri, clientOptions),
(uri, sharedKeyCredential, clientOptions) => new BlobServiceClient(uri, sharedKeyCredential, clientOptions),
(uri, tokenCredential, clientOptions) => new BlobServiceClient(uri, tokenCredential, clientOptions),
default,
(uri, azureSasCredential, clientOptions) => new BlobServiceClient(uri, azureSasCredential, clientOptions),
() => new BlobClientOptions(serviceVersion));

Expand Down
19 changes: 0 additions & 19 deletions sdk/storage/Azure.Storage.Common/tests/Shared/ClientBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ public class ClientBuilder<TServiceClient, TServiceClientOptions>
/// </summary>
public delegate TServiceClient GetServiceClientTokenCredential(Uri endpoint, TokenCredential credential, TServiceClientOptions clientOptions);

/// <summary>
/// Delegate for accessing a token credential constructor with parameter for a service client.
/// </summary>
public delegate TServiceClient GetServiceClientTokenCredentialWithParameter(Uri endpoint, TokenCredential credential, object credentialParameter, TServiceClientOptions clientOptions);

/// <summary>
/// Delegate for accessing a credential-less constructor for a service client.
/// </summary>
Expand All @@ -60,7 +55,6 @@ public class ClientBuilder<TServiceClient, TServiceClientOptions>
private readonly GetServiceClientStorageSharedKeyCredential _getServiceClientStorageSharedKeyCredential;
private readonly GetServiceClientAzureSasCredential _getServiceClientAzureSasCredential;
private readonly GetServiceClientTokenCredential _getServiceClientTokenCredential;
private readonly GetServiceClientTokenCredentialWithParameter _getServiceClientTokenCredentialWithParameter;
private readonly GetServiceClient _getServiceClient;
private readonly GetServiceClientOptions _getServiceClientOptions;

Expand Down Expand Up @@ -94,7 +88,6 @@ public ClientBuilder(
GetServiceClient getServiceClient,
GetServiceClientStorageSharedKeyCredential getServiceClientStorageSharedKeyCredential,
GetServiceClientTokenCredential getServiceClientTokenCredential,
GetServiceClientTokenCredentialWithParameter getServiceClientTokenCredentialWithParameter,
GetServiceClientAzureSasCredential getServiceClientAzureSasCredential,
GetServiceClientOptions getServiceClientOptions)
{
Expand All @@ -103,7 +96,6 @@ public ClientBuilder(
_getServiceClient = getServiceClient;
_getServiceClientStorageSharedKeyCredential = getServiceClientStorageSharedKeyCredential;
_getServiceClientTokenCredential = getServiceClientTokenCredential;
_getServiceClientTokenCredentialWithParameter = getServiceClientTokenCredentialWithParameter;
_getServiceClientAzureSasCredential = getServiceClientAzureSasCredential;
_getServiceClientOptions = getServiceClientOptions;
}
Expand Down Expand Up @@ -152,17 +144,6 @@ public TServiceClient GetServiceClientFromOauthConfig(
Tenants.GetOAuthCredential(config),
options ?? GetOptions()));

public TServiceClient GetServiceClientFromOauthConfigWithParameter(
TenantConfiguration config,
TServiceClientOptions options = default,
object parameter = default)
=> AzureCoreRecordedTestBase.InstrumentClient(
_getServiceClientTokenCredentialWithParameter(
new Uri(GetEndpoint(config)),
Tenants.GetOAuthCredential(config),
parameter,
options ?? GetOptions()));

public TServiceClientOptions GetOptions(bool parallelRange = false)
{
var options = _getServiceClientOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static BlobsClientBuilder GetNewBlobsClientBuilder(TenantConfigurationBui
(uri, clientOptions) => new BlobServiceClient(uri, clientOptions),
(uri, sharedKeyCredential, clientOptions) => new BlobServiceClient(uri, sharedKeyCredential, clientOptions),
(uri, tokenCredential, clientOptions) => new BlobServiceClient(uri, tokenCredential, clientOptions),
default,
(uri, azureSasCredential, clientOptions) => new BlobServiceClient(uri, azureSasCredential, clientOptions),
() => new BlobClientOptions(serviceVersion));
public static string GetNewContainerName(this BlobsClientBuilder clientBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static BlobsClientBuilder GetNewBlobsClientBuilder(TenantConfigurationBui
(uri, clientOptions) => new BlobServiceClient(uri, clientOptions),
(uri, sharedKeyCredential, clientOptions) => new BlobServiceClient(uri, sharedKeyCredential, clientOptions),
(uri, tokenCredential, clientOptions) => new BlobServiceClient(uri, tokenCredential, clientOptions),
default,
(uri, azureSasCredential, clientOptions) => new BlobServiceClient(uri, azureSasCredential, clientOptions),
() => new BlobClientOptions(serviceVersion));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public static DataLakeClientBuilder GetNewDataLakeClientBuilder(TenantConfigurat
(uri, clientOptions) => new DataLakeServiceClient(uri, clientOptions),
(uri, sharedKeyCredential, clientOptions) => new DataLakeServiceClient(uri, sharedKeyCredential, clientOptions),
(uri, tokenCredential, clientOptions) => new DataLakeServiceClient(uri, tokenCredential, clientOptions),
default,
(uri, azureSasCredential, clientOptions) => new DataLakeServiceClient(uri, azureSasCredential, clientOptions),
() => new DataLakeClientOptions(serviceVersion));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ protected ShareClient() { }
public ShareClient(string connectionString, string shareName) { }
public ShareClient(string connectionString, string shareName, Azure.Storage.Files.Shares.ShareClientOptions options) { }
public ShareClient(System.Uri shareUri, Azure.AzureSasCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareClient(System.Uri shareUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.Models.ShareFileRequestIntent? fileRequestIntent = default(Azure.Storage.Files.Shares.Models.ShareFileRequestIntent?), Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareClient(System.Uri shareUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareClient(System.Uri shareUri, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareClient(System.Uri shareUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public virtual string AccountName { get { throw null; } }
Expand Down Expand Up @@ -98,8 +98,9 @@ public ShareClient(System.Uri shareUri, Azure.Storage.StorageSharedKeyCredential
public partial class ShareClientOptions : Azure.Core.ClientOptions
{
public ShareClientOptions(Azure.Storage.Files.Shares.ShareClientOptions.ServiceVersion version = Azure.Storage.Files.Shares.ShareClientOptions.ServiceVersion.V2021_12_02) { }
public bool? AllowSourceTrailingDot { get { throw null; } set { } }
public bool? AllowTrailingDot { get { throw null; } set { } }
public bool? SourceAllowTrailingDot { get { throw null; } set { } }
public Azure.Storage.Files.Shares.Models.ShareTokenIntent? ShareTokenIntent { get { throw null; } set { } }
public Azure.Storage.TransferValidationOptions TransferValidation { get { throw null; } }
public Azure.Storage.Files.Shares.ShareClientOptions.ServiceVersion Version { get { throw null; } }
public enum ServiceVersion
Expand Down Expand Up @@ -128,7 +129,7 @@ protected ShareDirectoryClient() { }
public ShareDirectoryClient(string connectionString, string shareName, string directoryPath) { }
public ShareDirectoryClient(string connectionString, string shareName, string directoryPath, Azure.Storage.Files.Shares.ShareClientOptions options) { }
public ShareDirectoryClient(System.Uri directoryUri, Azure.AzureSasCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareDirectoryClient(System.Uri directoryUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.Models.ShareFileRequestIntent? fileRequestIntent = default(Azure.Storage.Files.Shares.Models.ShareFileRequestIntent?), Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareDirectoryClient(System.Uri directoryUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareDirectoryClient(System.Uri directoryUri, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareDirectoryClient(System.Uri directoryUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public virtual string AccountName { get { throw null; } }
Expand Down Expand Up @@ -195,7 +196,7 @@ protected ShareFileClient() { }
public ShareFileClient(string connectionString, string shareName, string filePath) { }
public ShareFileClient(string connectionString, string shareName, string filePath, Azure.Storage.Files.Shares.ShareClientOptions options) { }
public ShareFileClient(System.Uri fileUri, Azure.AzureSasCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareFileClient(System.Uri fileUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.Models.ShareFileRequestIntent? fileRequestIntent = default(Azure.Storage.Files.Shares.Models.ShareFileRequestIntent?), Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareFileClient(System.Uri fileUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareFileClient(System.Uri fileUri, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareFileClient(System.Uri fileUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public virtual string AccountName { get { throw null; } }
Expand Down Expand Up @@ -340,7 +341,7 @@ protected ShareServiceClient() { }
public ShareServiceClient(string connectionString) { }
public ShareServiceClient(string connectionString, Azure.Storage.Files.Shares.ShareClientOptions options) { }
public ShareServiceClient(System.Uri serviceUri, Azure.AzureSasCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareServiceClient(System.Uri serviceUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.Models.ShareFileRequestIntent? fileRequestIntent = default(Azure.Storage.Files.Shares.Models.ShareFileRequestIntent?), Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareServiceClient(System.Uri serviceUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareServiceClient(System.Uri serviceUri, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public ShareServiceClient(System.Uri serviceUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = null) { }
public virtual string AccountName { get { throw null; } }
Expand Down Expand Up @@ -860,11 +861,6 @@ public ShareFileRequestConditions() { }
public string LeaseId { get { throw null; } set { } }
public override string ToString() { throw null; }
}
public enum ShareFileRequestIntent
{
None = 0,
Backup = 1,
}
[System.FlagsAttribute]
public enum ShareFileTraits
{
Expand Down Expand Up @@ -1087,6 +1083,23 @@ internal ShareStatistics() { }
public int ShareUsageBytes { get { throw null; } }
public long ShareUsageInBytes { get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ShareTokenIntent : System.IEquatable<Azure.Storage.Files.Shares.Models.ShareTokenIntent>
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public ShareTokenIntent(string value) { throw null; }
public static Azure.Storage.Files.Shares.Models.ShareTokenIntent Backup { get { throw null; } }
public bool Equals(Azure.Storage.Files.Shares.Models.ShareTokenIntent other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.Storage.Files.Shares.Models.ShareTokenIntent left, Azure.Storage.Files.Shares.Models.ShareTokenIntent right) { throw null; }
public static implicit operator Azure.Storage.Files.Shares.Models.ShareTokenIntent (string value) { throw null; }
public static bool operator !=(Azure.Storage.Files.Shares.Models.ShareTokenIntent left, Azure.Storage.Files.Shares.Models.ShareTokenIntent right) { throw null; }
public override string ToString() { throw null; }
}
[System.FlagsAttribute]
public enum ShareTraits
{
Expand Down
Loading

0 comments on commit df8d71c

Please sign in to comment.