forked from AzureRT/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b3275b
commit 94b26c2
Showing
17 changed files
with
99 additions
and
24 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
11 changes: 11 additions & 0 deletions
11
experiments/Azure.Experiments/Azure.Experiments/Compute/ComputePolicy.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,11 @@ | ||
using Microsoft.Azure.Management.Compute.Models; | ||
|
||
namespace Azure.Experiments.Compute | ||
{ | ||
public struct ComputePolicy<T> : IInfoPolicy<T> | ||
where T : Resource | ||
{ | ||
public string GetLocation(T value) | ||
=> value.Location; | ||
} | ||
} |
11 changes: 6 additions & 5 deletions
11
...Experiments/Azure.Experiments/VmObject.cs → ...periments/Compute/VirtualMachineObject.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
7 changes: 7 additions & 0 deletions
7
experiments/Azure.Experiments/Azure.Experiments/IInfoPolicy.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,7 @@ | ||
namespace Azure.Experiments | ||
{ | ||
public interface IInfoPolicy<T> | ||
{ | ||
string GetLocation(T value); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
experiments/Azure.Experiments/Azure.Experiments/Network/NetworkObject.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,20 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.Azure.Management.Network.Models; | ||
|
||
namespace Azure.Experiments.Network | ||
{ | ||
public abstract class NetworkObject<T> : ResourceObject<T, NetworkPolicy<T>> | ||
where T : Resource | ||
{ | ||
protected NetworkObject(string name, ResourceGroupObject rg) : base(name, rg) | ||
{ | ||
} | ||
|
||
protected NetworkObject( | ||
string name, | ||
ResourceGroupObject rg, | ||
IEnumerable<AzureObject> dependencies) : base(name, rg, dependencies) | ||
{ | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
experiments/Azure.Experiments/Azure.Experiments/Network/NetworkPolicy.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,11 @@ | ||
using Microsoft.Azure.Management.Network.Models; | ||
|
||
namespace Azure.Experiments.Network | ||
{ | ||
public struct NetworkPolicy<T> : IInfoPolicy<T> | ||
where T : Resource | ||
{ | ||
public string GetLocation(T value) | ||
=> value.Location; | ||
} | ||
} |
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
9 changes: 9 additions & 0 deletions
9
experiments/Azure.Experiments/Azure.Experiments/Network/SubnetPolicy.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,9 @@ | ||
using Microsoft.Azure.Management.Network.Models; | ||
|
||
namespace Azure.Experiments | ||
{ | ||
public struct SubnetPolicy : IInfoPolicy<Subnet> | ||
{ | ||
public string GetLocation(Subnet value) => null; | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
experiments/Azure.Experiments/Azure.Experiments/ResourceGroupPolicy.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,10 @@ | ||
using Microsoft.Azure.Management.ResourceManager.Models; | ||
|
||
namespace Azure.Experiments | ||
{ | ||
public struct ResourceGroupPolicy : IInfoPolicy<ResourceGroup> | ||
{ | ||
public string GetLocation(ResourceGroup value) | ||
=> value.Location; | ||
} | ||
} |
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