示例#1
0
        private TestingAction AddNewAction(string action)
        {
            var newAction = new TestingAction(action);

            ActionList.Add(newAction);
            return(newAction);
        }
示例#2
0
        protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage requestMessage, CancellationToken cancellationToken)
        {
            TestingAction?.Invoke(requestMessage);

            var response = new HttpResponseMessage
            {
                Content    = HttpContent,
                StatusCode = StatusCode
            };

            return(await Task.FromResult(response).ConfigureAwait(false));
        }
示例#3
0
        private void ChangeRowColor(TestingAction action, Brush color)
        {
            var dgIndex = ActionList.Count - 1;
            var lastRow = (DataGridRow)DataGridDetails.ItemContainerGenerator.ContainerFromIndex(dgIndex);

            if (lastRow == null)
            {
                DataGridDetails.UpdateLayout();
                DataGridDetails.ScrollIntoView(action);
                lastRow = (DataGridRow)DataGridDetails.ItemContainerGenerator.ContainerFromIndex(dgIndex);
            }
            lastRow.Foreground = color;
        }