Ejemplo n.º 1
0
        /// <summary>Snippet for UpdateTrigger</summary>
        public void UpdateTrigger()
        {
            // Snippet: UpdateTrigger(Trigger, FieldMask, bool, CallSettings)
            // Create client
            EventarcClient eventarcClient = EventarcClient.Create();
            // Initialize request argument(s)
            Trigger   trigger      = new Trigger();
            FieldMask updateMask   = new FieldMask();
            bool      allowMissing = false;
            // Make the request
            Operation <Trigger, OperationMetadata> response = eventarcClient.UpdateTrigger(trigger, updateMask, allowMissing);

            // Poll until the returned long-running operation is complete
            Operation <Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Trigger result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceUpdateTrigger(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Trigger retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }