-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now the object dumper searches for the DumpAttribute.DumpMethod also …
…in the class' DumpAttribute. Fixed a bug in ProtocolExceptionToWebFaultResolver. Added overload for WebException too.
- Loading branch information
Showing
25 changed files
with
159 additions
and
73 deletions.
There are no files selected for viewing
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
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
42 changes: 42 additions & 0 deletions
42
Aspects/Diagnostics/ExternalMetadata/WebExceptionDumpMetadata.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,42 @@ | ||
using System; | ||
using System.IO; | ||
using System.Net; | ||
|
||
namespace vm.Aspects.Diagnostics.ExternalMetadata | ||
{ | ||
/// <remarks/> | ||
public abstract class WebExceptionDumpMetadata | ||
{ | ||
/// <remarks/> | ||
[Dump(0)] | ||
public object Status; | ||
|
||
/// <remarks/> | ||
[Dump(1, DumpClass = typeof(WebExceptionDumpMetadata), DumpMethod = nameof(DumpResponse))] | ||
public object Response; | ||
|
||
/// <remarks/> | ||
public static string DumpResponse( | ||
WebResponse response) | ||
{ | ||
var stream = response?.GetResponseStream(); | ||
|
||
if (stream == null) | ||
return "<null>"; | ||
|
||
try | ||
{ | ||
var reader = new StreamReader(stream, true); | ||
|
||
var result = reader.ReadToEnd(); | ||
stream.Seek(0, SeekOrigin.Begin); | ||
|
||
return result; | ||
} | ||
catch (Exception) | ||
{ | ||
return "<null>"; | ||
} | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
pushd | ||
cd %~dp0.. | ||
del ..\*.nupkg | ||
del *.nupkg | ||
NuGet Update -self | ||
call "%VS140COMNTOOLS%vsvars32.bat" | ||
if not .%1.==.. NuGet SetApiKey %1 | ||
msbuild vm.Aspects.Diagnostics.ObjectDumper.csproj /t:Rebuild /p:Configuration=Release /m | ||
if errorlevel 1 goto exit | ||
NuGet Pack NuGet\ObjectDumper.nuspec -Prop Configuration=Release -symbols | ||
if errorlevel 1 goto exit | ||
@echo Press any key to push to NuGet... > con: | ||
if exist c:\NuGet copy /y *.nupkg c:\NuGet | ||
@echo Press any key to push to NuGet.org... > con: | ||
@pause > nul: | ||
NuGet Push AspectObjectDumper.1.5.3.nupkg | ||
NuGet Push AspectObjectDumper.1.5.4.nupkg | ||
:exit | ||
popd | ||
pause |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.