diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Adapters/ProxyResource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/Adapters/ProxyResource.cs deleted file mode 100644 index 06d82c00de469..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Adapters/ProxyResource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.ResourceManager.Core -{ - /// - /// A class representing a generic proxy resource in Azure - /// - /// The type of the underlying model this class wraps - /// The type of the underlying modelresource Id - public abstract class ProxyResource : Resource - where TModel : class - where TIdentifier : TenantResourceIdentifier - { - /// - /// Initializes a new instance of the class. - /// - /// The identifier of the resource that is the target of operations. - /// The model to copy from. - protected ProxyResource(TIdentifier id, TModel data) - : base(id, id?.Name, id?.ResourceType) - { - Model = data; - } - - /// - /// Gets or sets the Model this resource is based off. - /// - public virtual TModel Model { get; set; } - - /// - /// Converts from a into the TModel. - /// - /// The tracked resource convert from. - public static implicit operator TModel(ProxyResource other) - { - return other.Model; - } - } -} diff --git a/sdk/resourcemanager/Proto.Client/network/Placeholder/SubnetData.cs b/sdk/resourcemanager/Proto.Client/network/Placeholder/SubnetData.cs index aa8a1d22ca655..9a7cefb7c9377 100644 --- a/sdk/resourcemanager/Proto.Client/network/Placeholder/SubnetData.cs +++ b/sdk/resourcemanager/Proto.Client/network/Placeholder/SubnetData.cs @@ -7,17 +7,24 @@ namespace Proto.Network /// /// A class representing the subnet data model. /// - public class SubnetData : ProxyResource + public class SubnetData : Resource { /// /// Initializes a new instance of the class. /// - public SubnetData(Azure.ResourceManager.Network.Models.Subnet sub) : base(sub.Id, sub) + public SubnetData(Azure.ResourceManager.Network.Models.Subnet sub) + : base(sub.Id, sub.Name, SubnetOperations.ResourceType) { + Model = sub; } /// - /// Gets the subnet id. + /// Gets or sets the Model this resource is based of. + /// + public virtual Azure.ResourceManager.Network.Models.Subnet Model { get; set; } + + /// + /// Gets the subnet id. /// public override string Name => Model.Name;