diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 15:28:10 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 15:28:10 +0200 |
| commit | d1e8b5dc2cfa93bf042773b4bf04a0f0bfc1f53d (patch) | |
| tree | 1bcd27f1461650204ba2e7b340f271ce703b1a41 /Software/Visual_Studio/Tango.Logging | |
| parent | 0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5 (diff) | |
| download | Tango-d1e8b5dc2cfa93bf042773b4bf04a0f0bfc1f53d.tar.gz Tango-d1e8b5dc2cfa93bf042773b4bf04a0f0bfc1f53d.zip | |
Added code comments for:
CodeGeneration.
Core.
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging')
| -rw-r--r-- | Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs | 25 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Logging/Tango.Logging.csproj | 8 |
2 files changed, 26 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs b/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs new file mode 100644 index 000000000..f969adeda --- /dev/null +++ b/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Tango.Logging +{ + /// <summary> + /// Contains <see cref="String"/> extension methods. + /// </summary> + public static class StringExtensions + { + /// <summary> + /// Converts the object to string. If the object is null, will return null. + /// </summary> + /// <param name="obj">The object.</param> + /// <returns></returns> + public static String ToStringSafe(this object obj) + { + return obj != null ? obj.ToString() : String.Empty; + } + } +} diff --git a/Software/Visual_Studio/Tango.Logging/Tango.Logging.csproj b/Software/Visual_Studio/Tango.Logging/Tango.Logging.csproj index 56728f097..93d0cd4ea 100644 --- a/Software/Visual_Studio/Tango.Logging/Tango.Logging.csproj +++ b/Software/Visual_Studio/Tango.Logging/Tango.Logging.csproj @@ -34,7 +34,6 @@ <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System" /> - <Reference Include="System.Core" /> <Reference Include="System.Windows" /> <Reference Include="System.Xaml" /> <Reference Include="System.Xml.Linq" /> @@ -55,6 +54,7 @@ <DependentUpon>ConsoleWindow.xaml</DependentUpon> </Compile> <Compile Include="ExceptionLogItem.cs" /> + <Compile Include="ExtensionMethods\StringExtensions.cs" /> <Compile Include="FileLogger.cs" /> <Compile Include="GlobalExceptionTrapper.cs" /> <Compile Include="IGlobalExceptionTrapper.cs" /> @@ -66,12 +66,6 @@ <Compile Include="VSOutputLogger.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Tango.Core\Tango.Core.csproj"> - <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> - <Name>Tango.Core</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> <Page Include="ConsoleWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> |
