Exemplo n.º 1
0
        public static async ValueTask <DataFlowResource> CreateResource(DataFlowClient client, TestRecording recording)
        {
            string name = recording.GenerateAssetName("DataFlow");
            DataFlowCreateOrUpdateDataFlowOperation create = await client.StartCreateOrUpdateDataFlowAsync(name, new DataFlowResource (new DataFlow()));

            return(await create.WaitForCompletionAsync());
        }
 public void CreateDataFlow()
 {
     #region Snippet:CreateDataFlow
     DataFlowCreateOrUpdateDataFlowOperation operation = DataFlowClient.StartCreateOrUpdateDataFlow("MyDataFlow", new DataFlowResource(new DataFlow()));
     DataFlowResource dataFlow = operation.WaitForCompletionAsync().ConfigureAwait(true).GetAwaiter().GetResult();
     #endregion
 }
Exemplo n.º 3
0
        public async Task DataFlowSample()
        {
            #region Snippet:CreateDataFlowClient
            // Replace the string below with your actual endpoint url.
            string endpoint = "<my-endpoint-url>";
            /*@@*/ endpoint = TestEnvironment.EndpointUrl;
            DataFlowClient client = new DataFlowClient(endpoint: new Uri(endpoint), credential: new DefaultAzureCredential());
            #endregion

            #region Snippet:CreateDataFlow
            DataFlowCreateOrUpdateDataFlowOperation operation       = client.StartCreateOrUpdateDataFlow("MyDataFlow", new DataFlowResource(new DataFlow()));
            Response <DataFlowResource>             createdDataflow = await operation.WaitForCompletionAsync();

            #endregion

            #region Snippet:RetrieveDataFlow
            DataFlowResource retrievedDataflow = client.GetDataFlow("MyDataFlow");
            #endregion

            #region Snippet:ListDataFlows
            Pageable <DataFlowResource> dataFlows = client.GetDataFlowsByWorkspace();
            foreach (DataFlowResource dataflow in dataFlows)
            {
                System.Console.WriteLine(dataflow.Name);
            }
            #endregion

            #region Snippet:DeleteDataFlow
            client.StartDeleteDataFlow("MyDataFlow");
            #endregion
        }
Exemplo n.º 4
0
        public async Task TestCreateDataFlow()
        {
            string dataFlowName = Recording.GenerateName("DataFlow");
            DataFlowCreateOrUpdateDataFlowOperation operation = await DataFlowClient.StartCreateOrUpdateDataFlowAsync(dataFlowName, new DataFlowResource(new DataFlow()));

            DataFlowResource dataFlow = await operation.WaitForCompletionAsync();

            Assert.AreEqual(dataFlowName, dataFlow.Name);
        }
Exemplo n.º 5
0
        public async Task TestDeleteDataFlow()
        {
            string dataFlowName = Recording.GenerateName("DataFlow");

            DataFlowCreateOrUpdateDataFlowOperation createOperation = await DataFlowClient.StartCreateOrUpdateDataFlowAsync(dataFlowName, new DataFlowResource(new DataFlow()));

            await createOperation.WaitForCompletionAsync();

            DataFlowDeleteDataFlowOperation deleteOperation = await DataFlowClient.StartDeleteDataFlowAsync(dataFlowName);

            Response response = await deleteOperation.WaitForCompletionAsync();

            Assert.AreEqual(200, response.Status);
        }