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
for /d /r . %%d in (bin, obj) do @if exist "%%d" rd /s/q "%%d" |
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
public static class ObjectExtensions | |
{ | |
public static TReturn safe<T, TReturn>(this T testedObject, Func<T, TReturn> member, TReturn defaultValue = default(TReturn)) | |
where T : class | |
{ | |
return testedObject != null ? member(testedObject) : defaultValue; | |
} | |
} | |
// Usage example: |
NewerOlder