Click here to Skip to main content
15,905,913 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unable to Access Method in Referenced .dll (C#/VS2017) Pin
Member 139418905-Sep-18 0:24
Member 139418905-Sep-18 0:24 
QuestionConstructor Injection Pin
jones298474-Sep-18 7:33
jones298474-Sep-18 7:33 
AnswerRe: Constructor Injection Pin
Mc_Topaz4-Sep-18 10:15
Mc_Topaz4-Sep-18 10:15 
QuestionAforge Video-Picture quality Pin
User 136751144-Sep-18 1:08
User 136751144-Sep-18 1:08 
QuestionC# convert image format to dpx Pin
Member 135795963-Sep-18 23:28
Member 135795963-Sep-18 23:28 
AnswerRe: C# convert image format to dpx Pin
OriginalGriff4-Sep-18 1:10
mveOriginalGriff4-Sep-18 1:10 
SuggestionRe: C# convert image format to dpx Pin
Richard Deeming4-Sep-18 1:48
mveRichard Deeming4-Sep-18 1:48 
Question"Hiding" functions from StackTrace Pin
Bernhard Hiller3-Sep-18 2:37
Bernhard Hiller3-Sep-18 2:37 
When some exception occurs in a class of the .Net framework, we see the public function of a public class called by our code only, the further details (private functions, or even non-public classes) used by the public function are hidden in the StackTrace of the exception object, when the exception occurred somewhere down there.

Now I have some functionality where I'd like to have such a feature, too:
For testing, we use MS Test. I added some extensions, e.g. "ThrowsAssert" (based on Asserting Exceptions in MSTest with Assert.Throws()[^]). When such an Assert fails, I get a long StackTrace like:
bei TestUtilities.ExceptionAssert.OnNoExceptionThrown[T](String _customMessage) in C:\Users\bernhard.hiller\SVN\Product-SW\trunk\C_TestUtilities\ExceptionAssert.cs:Zeile 29.
bei TestUtilities.ThrowsAssert.Throws[T](Action _task, String _expectedMessage, ExceptionMessageCompareOptions _messageOptions, ExceptionInheritanceOptions _inheritOptions, String _customMessage) in C:\Users\bernhard.hiller\SVN\Product-SW\trunk\C_TestUtilities\ThrowsAssert.cs:Zeile 42.
bei MyAssembly.Tests.MyClassTests.MyFunctionTest() in C:\Users\bernhard.hiller\SVN\Product-SW\trunk\MyAssemblyTests\MyClassTests.cs:Zeile 36.
or even longer...

Is there some way to "hide" all those functions of class ThrowsAssert and ExceptionAssert in the StackTrace?
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!

AnswerRe: "Hiding" functions from StackTrace Pin
OriginalGriff3-Sep-18 4:12
mveOriginalGriff3-Sep-18 4:12 
AnswerRe: "Hiding" functions from StackTrace Pin
Gerry Schmitz4-Sep-18 4:53
mveGerry Schmitz4-Sep-18 4:53 
Questionhow to use array in main that was created in class? Pin
Member 139703232-Sep-18 8:51
Member 139703232-Sep-18 8:51 
AnswerRe: how to use array in main that was created in class? Pin
Luc Pattyn2-Sep-18 16:40
sitebuilderLuc Pattyn2-Sep-18 16:40 
QuestionVB.net dll use with C# windows form Pin
BobbyStrain1-Sep-18 18:09
BobbyStrain1-Sep-18 18:09 
AnswerRe: VB.net dll use with C# windows form Pin
OriginalGriff1-Sep-18 19:55
mveOriginalGriff1-Sep-18 19:55 
GeneralRe: VB.net dll use with C# windows form Pin
BobbyStrain2-Sep-18 4:51
BobbyStrain2-Sep-18 4:51 
GeneralRe: VB.net dll use with C# windows form Pin
OriginalGriff2-Sep-18 4:57
mveOriginalGriff2-Sep-18 4:57 
GeneralRe: VB.net dll use with C# windows form Pin
BobbyStrain3-Sep-18 17:32
BobbyStrain3-Sep-18 17:32 
GeneralRe: VB.net dll use with C# windows form Pin
OriginalGriff3-Sep-18 20:12
mveOriginalGriff3-Sep-18 20:12 
GeneralRe: VB.net dll use with C# windows form Pin
BobbyStrain4-Sep-18 17:17
BobbyStrain4-Sep-18 17:17 
GeneralRe: VB.net dll use with C# windows form Pin
Mycroft Holmes4-Sep-18 19:21
professionalMycroft Holmes4-Sep-18 19:21 
GeneralRe: VB.net dll use with C# windows form Pin
BobbyStrain6-Sep-18 11:12
BobbyStrain6-Sep-18 11:12 
QuestionCostura.Fody fails on govt. network Pin
Member 1348136130-Aug-18 10:37
Member 1348136130-Aug-18 10:37 
AnswerRe: Costura.Fody fails on govt. network Pin
Dave Kreskowiak30-Aug-18 10:51
mveDave Kreskowiak30-Aug-18 10:51 
GeneralRe: Costura.Fody fails on govt. network Pin
Member 1348136130-Aug-18 15:09
Member 1348136130-Aug-18 15:09 
GeneralRe: Costura.Fody fails on govt. network Pin
Dave Kreskowiak30-Aug-18 15:52
mveDave Kreskowiak30-Aug-18 15:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.