-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ArieShout/menxiao/signalr
SignalR Service PowerShell module continued
- Loading branch information
Showing
22 changed files
with
1,131 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/ResourceManager/SignalR/Commands.SignalR/Cmdlets/IWithInputObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.Azure.Commands.SignalR.Models; | ||
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.Azure.Commands.SignalR | ||
{ | ||
public interface IWithInputObject : IWithResourceGroupAndName | ||
{ | ||
PSSignalRResource InputObject { get; } | ||
} | ||
|
||
public static class IWithInputObjectExtensions | ||
{ | ||
public static void LoadFromInputObject(this IWithInputObject cmdlet) | ||
{ | ||
var resourceId = new ResourceIdentifier(cmdlet.InputObject.Id); | ||
cmdlet.ResourceGroupName = resourceId.ResourceGroupName; | ||
cmdlet.Name = resourceId.ResourceName; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ResourceManager/SignalR/Commands.SignalR/Cmdlets/IWithResourceGroupAndName.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.Azure.Commands.SignalR | ||
{ | ||
public interface IWithResourceGroupAndName | ||
{ | ||
string ResourceGroupName { get; set; } | ||
string Name { get; set; } | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/ResourceManager/SignalR/Commands.SignalR/Cmdlets/IWithResourceId.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.Azure.Commands.SignalR | ||
{ | ||
public interface IWithResourceId : IWithResourceGroupAndName | ||
{ | ||
string ResourceId { get; } | ||
} | ||
|
||
public static class IWithResourceIdExtensions | ||
{ | ||
public static void LoadFromResourceId(this IWithResourceId cmdlet) | ||
{ | ||
var resourceId = new ResourceIdentifier(cmdlet.ResourceId); | ||
cmdlet.ResourceGroupName = resourceId.ResourceGroupName; | ||
cmdlet.Name = resourceId.ResourceName; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.