Exemple #1
0
        public async Task <DatasetGetResponse> GetAsync(
            string resourceGroupName,
            string dataFactoryName,
            string datasetName,
            CancellationToken cancellationToken)
        {
            Core.Models.DatasetGetResponse response = await this.Client.InternalClient.Datasets.GetAsync(
                resourceGroupName,
                dataFactoryName,
                datasetName,
                cancellationToken);

            return(new DatasetGetResponse(response, this.Client));
        }
        /// <summary>
        /// Deserializes the given json into a <see cref="Core.Models.Dataset"/> instance, by mocking a get request to
        /// exercise the client's deserialization logic.
        /// </summary>
        /// <param name="json">The JSON string to deserialize.</param>
        /// <returns></returns>
        internal static Models.Dataset DeserializeInternalDatasetJson(string json)
        {
            var handler = new MockResourceProviderDelegatingHandler()
            {
                Json = json
            };

            var    client            = GetFakeClient(handler);
            string resourceGroupName = Guid.NewGuid().ToString("D");
            string dataFactoryName   = Guid.NewGuid().ToString("D");
            string datasetName       = Guid.NewGuid().ToString("D");

            Models.DatasetGetResponse getResponse = client.Datasets.Get(resourceGroupName, dataFactoryName, datasetName);
            return(getResponse.Dataset);
        }