-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77ec52f
commit e9d7ee5
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Frank.Wpf.Controls.HttpMessageRenderer/Frank.Wpf.Controls.HttpMessageRenderer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
|
||
</PropertyGroup> | ||
|
||
</Project> |
29 changes: 29 additions & 0 deletions
29
Frank.Wpf.Controls.HttpMessageRenderer/HttpRequestMessageControl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Net.Http; | ||
using System.Windows.Controls; | ||
|
||
namespace Frank.Wpf.Controls.HttpMessageRenderer; | ||
|
||
public class HttpRequestMessageControl : ContentControl | ||
{ | ||
private HttpRequestMessage _httpRequestMessage; | ||
|
||
public HttpRequestMessageControl(HttpRequestMessage httpRequestMessage) | ||
{ | ||
_httpRequestMessage = httpRequestMessage; | ||
Render(); | ||
} | ||
|
||
public void Update(HttpRequestMessage httpRequestMessage) | ||
{ | ||
_httpRequestMessage = httpRequestMessage; | ||
Render(); | ||
} | ||
|
||
public void Render() | ||
{ | ||
Content = new TextBlock | ||
{ | ||
Text = _httpRequestMessage.ToString() | ||
}; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
Frank.Wpf.Controls.HttpMessageRenderer/HttpResponseMessageControl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Net.Http; | ||
using System.Windows.Controls; | ||
|
||
namespace Frank.Wpf.Controls.HttpMessageRenderer; | ||
|
||
public class HttpResponseMessageControl : ContentControl | ||
{ | ||
private HttpResponseMessage _httpResponseMessage; | ||
|
||
public HttpResponseMessageControl(HttpResponseMessage httpResponseMessage) | ||
{ | ||
_httpResponseMessage = httpResponseMessage; | ||
Render(); | ||
} | ||
|
||
public void Update(HttpResponseMessage httpResponseMessage) | ||
{ | ||
_httpResponseMessage = httpResponseMessage; | ||
Render(); | ||
} | ||
|
||
public void Render() | ||
{ | ||
Content = new TextBlock | ||
{ | ||
Text = _httpResponseMessage.ToString() | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters