Skip to content

Commit 01cc744

Browse files
authored
Merge pull request Azure#6139 from sergey-shandar/sergey-signalr-bugfix
SignalR bug fix for null pointer exception
2 parents 3d76b0a + 1ca8c50 commit 01cc744

File tree

8 files changed

+49
-3
lines changed

8 files changed

+49
-3
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
Please leave this section at the top of the change log.
3+
4+
Changes for the current release should go under the section titled "Current Release", and should adhere to the following format:
5+
6+
## Current Release
7+
* Overview of change #1
8+
- Additional information about change #1
9+
* Overview of change #2
10+
- Additional information about change #2
11+
- Additional information about change #2
12+
* Overview of change #3
13+
* Overview of change #4
14+
- Additional information about change #4
15+
16+
## YYYY.MM.DD - Version X.Y.Z (Previous Release)
17+
* Overview of change #1
18+
- Additional information about change #1
19+
-->
20+
## 0.1.1
21+
22+
* `New-AzureRmSignalR` null reference bug fix.

src/ResourceManager/SignalR/Commands.SignalR/AzureRM.SignalR.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.1.0'
15+
ModuleVersion = '0.1.1'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.6.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '5.0.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = @(
@@ -115,7 +115,7 @@ PrivateData = @{
115115
# IconUri = ''
116116

117117
# ReleaseNotes of this module
118-
ReleaseNotes = '* Initial command set for SignalR service'
118+
ReleaseNotes = '* `New-AzureRmSignalR` null reference bug fix.'
119119

120120
# Prerelease string of this module
121121
Prerelease = 'preview'

src/ResourceManager/SignalR/Commands.SignalR/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/SignalR/Commands.SignalR/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
<data name="DefaultResourceGroupKey" xml:space="preserve">
121121
<value>Default Resource Group</value>
122122
</data>
123+
<data name="NoSubscriptionInContext" xml:space="preserve">
124+
<value>No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Connect-AzureRmAccount to login.</value>
125+
</data>
123126
<data name="ParameterSetError" xml:space="preserve">
124127
<value>The parameter set could not be determined from the provided parameters. Please check the documentation for appropriate parameters, and report this issue at https://github.com/azure/azure-powershell/issues</value>
125128
</data>

src/ResourceManager/SignalR/Commands.SignalR/Strategies/Client.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
using Microsoft.Azure.Commands.Common.Authentication;
1616
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
1717
using Microsoft.Azure.Commands.Common.Strategies;
18+
using Microsoft.Azure.Commands.SignalR.Properties;
1819
using Microsoft.Rest;
20+
using System;
1921

2022
namespace Microsoft.Azure.Commands.SignalR.Strategies
2123
{
@@ -27,6 +29,11 @@ sealed class Client : IClient
2729

2830
public Client(IAzureContext context)
2931
{
32+
if (context == null)
33+
{
34+
throw new ApplicationException(Resources.NoSubscriptionInContext);
35+
}
36+
3037
Context = context;
3138
SubscriptionId = Context.Subscription.Id;
3239
}

src/ResourceManager/SignalR/SignalR.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Authenticat
2525
EndProject
2626
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "..\..\ServiceManagement\Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}"
2727
EndProject
28+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{64DE12BE-23D1-4D48-8798-4F26BA697254}"
29+
ProjectSection(SolutionItems) = preProject
30+
ChangeLog.md = ChangeLog.md
31+
EndProjectSection
32+
EndProject
2833
Global
2934
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3035
Debug|Any CPU = Debug|Any CPU
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)