Skip to content

Commit 030ebad

Browse files
author
Timothy Mothra
authored
prune public api (#2336)
1 parent 39d636f commit 030ebad

File tree

10 files changed

+17
-77
lines changed

10 files changed

+17
-77
lines changed
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
2-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken>
3-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
4-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken() -> void
5-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken(string token, System.DateTimeOffset expiresOn) -> void
6-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.get -> System.DateTimeOffset
7-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.set -> void
8-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.get -> string
9-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.set -> void
10-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
11-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.CredentialEnvelope() -> void
12-
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.CredentialEnvelope.get -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
1+
132
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.SetAzureTokenCredential(object tokenCredential) -> void
3+
144
Microsoft.ApplicationInsights.Channel.IAsyncFlushable
155
Microsoft.ApplicationInsights.Channel.IAsyncFlushable.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
166
Microsoft.ApplicationInsights.Channel.InMemoryChannel.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
177
Microsoft.ApplicationInsights.TelemetryClient.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
18-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Equals(object obj) -> bool
19-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.GetHashCode() -> int
20-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator !=(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool
21-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator ==(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
2-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken>
3-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
4-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken() -> void
5-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken(string token, System.DateTimeOffset expiresOn) -> void
6-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.get -> System.DateTimeOffset
7-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.set -> void
8-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.get -> string
9-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.set -> void
10-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
11-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.CredentialEnvelope() -> void
12-
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.CredentialEnvelope.get -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
1+
132
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.SetAzureTokenCredential(object tokenCredential) -> void
3+
144
Microsoft.ApplicationInsights.Channel.IAsyncFlushable
155
Microsoft.ApplicationInsights.Channel.IAsyncFlushable.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
166
Microsoft.ApplicationInsights.Channel.InMemoryChannel.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
177
Microsoft.ApplicationInsights.TelemetryClient.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
18-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Equals(object obj) -> bool
19-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.GetHashCode() -> int
20-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator !=(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool
21-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator ==(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
2-
abstract Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.GetTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken>
3-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken
4-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken() -> void
5-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.AuthToken(string token, System.DateTimeOffset expiresOn) -> void
6-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.get -> System.DateTimeOffset
7-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.ExpiresOn.set -> void
8-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.get -> string
9-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Token.set -> void
10-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
11-
Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope.CredentialEnvelope() -> void
12-
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.CredentialEnvelope.get -> Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.CredentialEnvelope
1+
132
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.SetAzureTokenCredential(object tokenCredential) -> void
3+
144
Microsoft.ApplicationInsights.Channel.IAsyncFlushable
155
Microsoft.ApplicationInsights.Channel.IAsyncFlushable.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
166
Microsoft.ApplicationInsights.Channel.InMemoryChannel.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
177
Microsoft.ApplicationInsights.TelemetryClient.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>
18-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.Equals(object obj) -> bool
19-
override Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.GetHashCode() -> int
20-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator !=(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool
21-
static Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken.operator ==(Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken left, Microsoft.ApplicationInsights.Extensibility.Implementation.Authentication.AuthToken right) -> bool

BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Authentication/AuthToken.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/// This represents the Azure.Core.AccessToken returned by Azure.Core.TokenCredential.
77
/// (https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/src/AccessToken.cs).
88
/// </summary>
9-
public struct AuthToken
9+
internal struct AuthToken : IEquatable<AuthToken>
1010
{
1111
/// <summary>
1212
/// Initializes a new instance of <see cref="AuthToken"/>.
@@ -46,17 +46,12 @@ public AuthToken(string token, DateTimeOffset expiresOn)
4646
public static bool operator !=(AuthToken left, AuthToken right) => !left.Equals(right);
4747

4848
/// <inheritdoc />
49-
public override bool Equals(object obj)
50-
{
51-
if (obj is AuthToken authToken)
52-
{
53-
return authToken.ExpiresOn == this.ExpiresOn && authToken.Token == this.Token;
54-
}
55-
56-
return false;
57-
}
49+
public override bool Equals(object obj) => (obj is AuthToken authToken) && this.Equals(authToken);
5850

5951
/// <inheritdoc />
6052
public override int GetHashCode() => this.Token.GetHashCode() ^ this.ExpiresOn.GetHashCode();
53+
54+
/// <inheritdoc />
55+
public bool Equals(AuthToken other) => other.ExpiresOn == this.ExpiresOn && other.Token == this.Token;
6156
}
6257
}

BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Authentication/CredentialEnvelope.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// This interface defines a class that can interact with Azure.Core.TokenCredential.
88
/// See also: (https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/src/TokenCredential.cs).
99
/// </summary>
10-
public abstract class CredentialEnvelope
10+
internal abstract class CredentialEnvelope
1111
{
1212
/// <summary>
1313
/// Gets the TokenCredential instance held by this class.

BASE/src/Microsoft.ApplicationInsights/Extensibility/TelemetryConfiguration.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,9 @@ public string ConnectionString
339339

340340
/// <summary>
341341
/// Gets an envelope for Azure.Core.TokenCredential which provides an AAD Authenticated token.
342-
/// FOR INTERNAL USE ONLY. To set the Credential use <see cref="SetAzureTokenCredential"/>.
342+
/// To set the Credential use <see cref="SetAzureTokenCredential"/>.
343343
/// </summary>
344-
[EditorBrowsable(EditorBrowsableState.Never)]
345-
public CredentialEnvelope CredentialEnvelope { get; private set; }
344+
internal CredentialEnvelope CredentialEnvelope { get; private set; }
346345

347346
/// <summary>
348347
/// Gets or sets the chain of processors.

BASE/src/Microsoft.ApplicationInsights/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[assembly: InternalsVisibleTo("Microsoft.ApplicationInsights.AspNetCore.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
1010
[assembly: InternalsVisibleTo("Microsoft.ApplicationInsights.WorkerService.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
1111
[assembly: InternalsVisibleTo("Microsoft.AI.ServerTelemetryChannel, PublicKey=" + AssemblyInfo.PublicKey)]
12+
[assembly: InternalsVisibleTo("Microsoft.AI.PerfCounterCollector, PublicKey=" + AssemblyInfo.PublicKey)]
1213

1314
// Assembly dynamically generated by Moq in unit tests
1415
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=" + AssemblyInfo.MoqPublicKey)]

WEB/Src/PerformanceCollector/PerformanceCollector/AssemblyInfo.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,3 @@
99
[assembly: InternalsVisibleTo("Microsoft.AI.PerformanceCollector.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
1010
[assembly: InternalsVisibleTo("Microsoft.ApplicationInsights.AspNetCore.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
1111
[assembly: InternalsVisibleTo("Microsoft.ApplicationInsights.WorkerService.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
12-
13-
internal static class AssemblyInfo
14-
{
15-
#if PUBLIC_RELEASE
16-
// Public key; assemblies are delay signed.
17-
public const string PublicKey = "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9";
18-
#else
19-
// Internal key; assemblies are public signed.
20-
public const string PublicKey = "0024000004800000940000000602000000240000525341310004000001000100319b35b21a993df850846602dae9e86d8fbb0528a0ad488ecd6414db798996534381825f94f90d8b16b72a51c4e7e07cf66ff3293c1046c045fafc354cfcc15fc177c748111e4a8c5a34d3940e7f3789dd58a928add6160d6f9cc219680253dcea88a034e7d472de51d4989c7783e19343839273e0e63a43b99ab338149dd59f";
21-
#endif
22-
23-
public const string MoqPublicKey = "0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
24-
}

WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void Initialize(TelemetryConfiguration configuration)
189189

190190
this.telemetryConfiguration = configuration;
191191
this.client = new TelemetryClient(configuration);
192-
this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion(PerformanceCounterUtility.SDKVersionPrefix());
192+
this.client.Context.GetInternalContext().SdkVersion = Common.SdkVersionUtils.GetSdkVersion(PerformanceCounterUtility.SDKVersionPrefix());
193193

194194
this.lastRefreshTimestamp = DateTime.MinValue;
195195

WEB/Src/PerformanceCollector/PerformanceCollector/QuickPulseTelemetryModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ private void InitializeServiceClient(TelemetryConfiguration configuration)
410410
string instanceName = string.IsNullOrWhiteSpace(cloudContext?.RoleInstance) ? Environment.MachineName : cloudContext.RoleInstance;
411411
string roleName = cloudContext?.RoleName ?? string.Empty;
412412
string streamId = GetStreamId();
413-
var assemblyVersion = SdkVersionUtils.GetSdkVersion(null);
413+
var assemblyVersion = Common.SdkVersionUtils.GetSdkVersion(null);
414414
bool isWebApp = PerformanceCounterUtility.IsWebAppRunningInAzure();
415415
int? processorCount = PerformanceCounterUtility.GetProcessorCount();
416416
this.ServiceClient = new QuickPulseServiceClient(

0 commit comments

Comments
 (0)