From 01e3b888ee3d8e9b943ca98384ccfb19565ab045 Mon Sep 17 00:00:00 2001 From: m-nash Date: Tue, 18 May 2021 11:04:25 -0700 Subject: [PATCH 1/2] remove id type from container base to match operation base --- .../Azure.ResourceManager.Core/src/ContainerBase.cs | 12 +++++------- .../src/ResourceContainerBase.cs | 2 +- .../src/SingletonOperationsBase.cs | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index 77576e91cd69..4be770459a61 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -6,29 +6,27 @@ namespace Azure.ResourceManager.Core /// /// Base class representing collection of resources. /// - /// The type of the resource identifier. - public abstract class ContainerBase : OperationsBase - where TIdentifier : ResourceIdentifier + public abstract class ContainerBase : OperationsBase { /// - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of the class for mocking. /// protected ContainerBase() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The identifier of the resource that is the target of operations. - internal ContainerBase(ClientContext clientContext, TIdentifier id) + internal ContainerBase(ClientContext clientContext, ResourceIdentifier id) : base(clientContext, id) { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The resource representing the parent resource. protected ContainerBase(ResourceOperationsBase parent) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceContainerBase.cs index 7fcaaded8fe2..a4c9f5b400da 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceContainerBase.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Core /// The type of the resource identifier. /// The type of the class containing operations for the underlying resource. /// The type of the class containing properties for the underlying resource. - public abstract class ResourceContainerBase : ContainerBase + public abstract class ResourceContainerBase : ContainerBase where TIdentifier : ResourceIdentifier where TOperations : ResourceOperationsBase where TResource : class diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/SingletonOperationsBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/SingletonOperationsBase.cs index 5e6aae942126..83e920b1cc28 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/SingletonOperationsBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/SingletonOperationsBase.cs @@ -60,7 +60,7 @@ protected SingletonOperationsBase() } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The resource representing the parent resource. protected SingletonOperationsBase(OperationsBase parent) From b04b9c379995c1ed537b4eb3061651be75451e74 Mon Sep 17 00:00:00 2001 From: m-nash Date: Tue, 18 May 2021 11:20:00 -0700 Subject: [PATCH 2/2] update proto references --- .../compute/VirtualMachineExtensionImageContainer.cs | 2 +- .../Proto.Client/compute/VirtualMachineImageContainer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineExtensionImageContainer.cs b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineExtensionImageContainer.cs index 07ead0dd3fc0..3918092fb35e 100644 --- a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineExtensionImageContainer.cs +++ b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineExtensionImageContainer.cs @@ -15,7 +15,7 @@ namespace Proto.Compute /// /// A class representing collection of VirtualMachine and their operations over a ResourceGroup. /// - public class VirtualMachineExtensionImageContainer : ContainerBase + public class VirtualMachineExtensionImageContainer : ContainerBase { private string _subsriptionId; diff --git a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineImageContainer.cs b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineImageContainer.cs index 30df61872173..42f4657febc6 100644 --- a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineImageContainer.cs +++ b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineImageContainer.cs @@ -14,7 +14,7 @@ namespace Proto.Compute /// /// A class representing collection of VirtualMachine and their operations over a ResourceGroup. /// - public class VirtualMachineImageContainer : ContainerBase + public class VirtualMachineImageContainer : ContainerBase { private string _subscriptionId;