Skip to content

Commit

Permalink
Merge pull request #151 from Azure/version-4.0.0-cleanup
Browse files Browse the repository at this point in the history
Code Cleanup for 4.0
  • Loading branch information
stankovski authored Aug 14, 2020
2 parents 3422ff3 + e75eeb9 commit 9d1d41c
Show file tree
Hide file tree
Showing 76 changed files with 2,089 additions and 341 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using System;
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using Microsoft.Azure.NotificationHubs.Auth;
using Microsoft.Azure.NotificationHubs.Messaging;
using Microsoft.Azure.NotificationHubs.Tests;
using Microsoft.Azure.Storage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using Microsoft.Azure.NotificationHubs.Messaging;
using RichardSzalay.MockHttp;
using Xunit;

namespace Microsoft.Azure.NotificationHubs.DotNetCore.Tests
{
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using Microsoft.Azure.NotificationHubs.Messaging;
using RichardSzalay.MockHttp;
using Xunit;

public class NamespaceManagerRetryPolicyTests
{
private readonly string _connectionString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using Microsoft.Azure.NotificationHubs.Messaging;
using RichardSzalay.MockHttp;
using Xunit;

namespace Microsoft.Azure.NotificationHubs.DotNetCore.Tests
{
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using Microsoft.Azure.NotificationHubs.Messaging;
using RichardSzalay.MockHttp;
using Xunit;

public class NotificationHubClientRetryPolicyTests
{
private readonly string _connectionString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Azure.NotificationHubs.Messaging;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using Xunit;

namespace Microsoft.Azure.NotificationHubs.Tests
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Extensions.Configuration;
using Messaging;
using Newtonsoft.Json;
using Xunit;

public class NotificationHubClientTest
{
private readonly IConfigurationRoot _configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// license information.
//------------------------------------------------------------

using Xunit;

namespace Microsoft.Azure.NotificationHubs.Tests
{
using Xunit;

public class NotificationHubConnectionStringBuilderTests
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.Azure.NotificationHubs.Tests
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

public class TestServerProxy : HttpClientHandler
{
private const string ServerUriKey = "##ServerUri##";
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Azure.NotificationHubs/AdmNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// license information.
//----------------------------------------------------------------

using System;

namespace Microsoft.Azure.NotificationHubs
{
using System;

/// <summary>
/// Represents the Amazon Device Messaging (ADM) notification.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents the description of the Amazon Device Messaging (ADM) registration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents the description of the Amazon Device Messaging (ADM) template registration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents Notification Hub registration description for Google Cloud Messaging
/// </summary>
Expand Down Expand Up @@ -152,6 +152,8 @@ public FcmRegistrationDescription(string fcmRegistrationId, IEnumerable<string>
{
}

#pragma warning disable CS0618

/// <summary>
/// Creates instance of <see cref="T:Microsoft.Azure.NotificationHubs.FcmRegistrationDescription"/> class from <see cref="T:Microsoft.Azure.NotificationHubs.GcmRegistrationDescription"/> object.
/// </summary>
Expand All @@ -165,6 +167,8 @@ internal FcmRegistrationDescription(GcmRegistrationDescription gcmRegistration)
this.PushVariables = gcmRegistration.PushVariables;
}

#pragma warning restore CS0618

internal FcmRegistrationDescription(string notificationHubPath, string fcmRegistrationId, IEnumerable<string> tags)
: base(notificationHubPath)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents Notification Hub template registration description for Google Cloud Messaging
/// </summary>
Expand Down Expand Up @@ -243,6 +243,8 @@ public FcmTemplateRegistrationDescription(string fcmRegistrationId, string jsonP
{
}

#pragma warning disable CS0618

/// <summary>
/// Creates instance of <see cref="T:Microsoft.Azure.NotificationHubs.FcmTemplateRegistrationDescription"/> class from <see cref="T:Microsoft.Azure.NotificationHubs.GcmTemplateRegistrationDescription"/> object.
/// </summary>
Expand All @@ -254,6 +256,8 @@ internal FcmTemplateRegistrationDescription(GcmTemplateRegistrationDescription g
this.TemplateName = gcmRegistration.TemplateName;
}

#pragma warning restore CS0618

internal FcmTemplateRegistrationDescription(string notificationHubPath, string fcmRegistrationId, string jsonPayload, IEnumerable<string> tags)
: base(notificationHubPath, fcmRegistrationId, tags)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.Azure.NotificationHubs/AppleNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// license information.
//----------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;

/// <summary>
/// Represents the Apple notification.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents the description of apple registration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using Microsoft.Azure.NotificationHubs.Messaging;

namespace Microsoft.Azure.NotificationHubs
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using Microsoft.Azure.NotificationHubs.Messaging;

/// <summary>
/// Represents the description of the Apple template registration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
// license information.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Web;

namespace Microsoft.Azure.NotificationHubs.Auth
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Web;

internal static class SharedAccessSignatureBuilder
{
private const string SharedAccessSignature = "SharedAccessSignature";
Expand Down
Loading

0 comments on commit 9d1d41c

Please sign in to comment.