ManagementGroup IOperationSource <ManagementGroup> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = ManagementGroupData.DeserializeManagementGroupData(document.RootElement);

            return(new ManagementGroup(_client, data));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManagementGroup"/> class.
 /// </summary>
 /// <param name="operations"> The operations to copy the client options from. </param>
 /// <param name="resource"> The ManagementGroupData to use in these operations. </param>
 internal ManagementGroup(ArmResource operations, ManagementGroupData resource)
     : base(operations, resource.Id)
 {
     _data              = resource;
     HasData            = true;
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _restClient        = new ManagementGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
Ejemplo n.º 3
0
 internal ManagementGroup(ArmClient client, ManagementGroupData data) : this(client, data.Id)
 {
     HasData = true;
     _data   = data;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManagementGroup"/> class.
 /// </summary>
 /// <param name="operations"> The operations to copy the client options from. </param>
 /// <param name="resource"> The ManagementGroupData to use in these operations. </param>
 internal ManagementGroup(ResourceOperations operations, ManagementGroupData resource)
     : base(operations, resource.Id)
 {
     Data = resource;
 }