Exemplo n.º 1
0
        public async Task <TableGetResponse> GetAsync(
            string resourceGroupName,
            string dataFactoryName,
            string tableName,
            CancellationToken cancellationToken)
        {
            Core.Models.TableGetResponse response = await this.Client.InternalClient.Tables.GetAsync(
                resourceGroupName,
                dataFactoryName,
                tableName,
                cancellationToken);

            return(new TableGetResponse(response, this.Client));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserializes the given json into an Hydra OM InternalTable 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.Table DeserializeInternalTableJson(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 tableName         = Guid.NewGuid().ToString("D");

            Models.TableGetResponse getResponse = client.Tables.Get(resourceGroupName, dataFactoryName, tableName);
            return(getResponse.Table);
        }