Skip to content

Commit

Permalink
WindowsStore: Added new overloads to Tracing in MPfm.Core. Updated mo…
Browse files Browse the repository at this point in the history
…re classes for WinRT (some with comments for now). All classes in MVP now use Tracing.Log instead of Console.WriteLine.

Related to issue #423.
  • Loading branch information
ycastonguay committed Sep 12, 2013
1 parent f4f2935 commit ba56a7c
Show file tree
Hide file tree
Showing 37 changed files with 2,242 additions and 329 deletions.
22 changes: 16 additions & 6 deletions MPfm/MPfm.Core/Tracing.cs
Expand Up @@ -26,12 +26,22 @@ namespace MPfm.Core
public static class Tracing
{
/// <summary>
/// Logs the message to configured trace listeners.
/// Logs a message to configured trace listeners.
/// </summary>
/// <param name="message">Message to log</param>
public static void Log(string message)
{
LogInternal(string.Format("[{0}] {1}", DateTime.Now, message));
LogInternal(message);
}

/// <summary>
/// Logs a message with composite format string to configured trace listeners.
/// </summary>
/// <param name="message">Composite format string</param>
/// <param name="args">Object that contains zero or more objects</param>
public static void Log(string format, params object[] args)
{
LogInternal(string.Format(format, args));
}

/// <summary>
Expand All @@ -48,12 +58,12 @@ public static void Log(Exception ex)
}

/// <summary>
/// Logs the message to configured trace listeners (without time stamp)
/// Logs the message to configured trace listeners (with time stamp)
/// </summary>
/// <param name="message"></param>
public static void LogWithoutTimeStamp(string message)
{
LogInternal(message);
public static void LogWithTimeStamp(string message)
{
LogInternal(string.Format("[{0}] {1}", DateTime.Now, message));
}

private static void LogInternal(string message)
Expand Down
3 changes: 0 additions & 3 deletions MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj
Expand Up @@ -130,17 +130,14 @@
<Compile Include="UpdateLibrary\UpdateLibraryException.cs" />
<Compile Include="Services\LibraryService.cs" />
<Compile Include="Services\Interfaces\ILibraryService.cs" />
<Compile Include="Services\SyncDiscoveryService.cs" />
<Compile Include="Services\Interfaces\ISyncDiscoveryService.cs" />
<Compile Include="Services\Interfaces\ISyncListenerService.cs" />
<Compile Include="Services\Interfaces\ISyncClientService.cs" />
<Compile Include="Services\SyncClientService.cs" />
<Compile Include="Services\AudioFileCacheService.cs" />
<Compile Include="Services\Interfaces\IAudioFileCacheService.cs" />
<Compile Include="Objects\LibraryQuery.cs" />
<Compile Include="Messages\AudioFileCacheUpdatedMessage.cs" />
<Compile Include="Objects\SyncDevice.cs" />
<Compile Include="Services\SyncListenerService.cs" />
<Compile Include="ISyncDeviceSpecifications.cs" />
<Compile Include="Services\UpdateLibraryService.cs" />
<Compile Include="Services\Interfaces\IUpdateLibraryService.cs" />
Expand Down
6 changes: 3 additions & 3 deletions MPfm/MPfm.Library/MPfm.Library.WindowsStore.csproj
Expand Up @@ -135,6 +135,9 @@
<Compile Include="Objects\Folder.cs" />
<Compile Include="Library.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\WinRT\SyncClientService.cs" />
<Compile Include="Services\WinRT\SyncDiscoveryService.cs" />
<Compile Include="Services\WinRT\SyncListenerService.cs" />
<Compile Include="SQLite.cs" />
<Compile Include="SQLiteAsync.cs" />
<Compile Include="UpdateLibrary\UpdateLibraryProgressDataSong.cs" />
Expand All @@ -145,17 +148,14 @@
<Compile Include="UpdateLibrary\UpdateLibraryException.cs" />
<Compile Include="Services\LibraryService.cs" />
<Compile Include="Services\Interfaces\ILibraryService.cs" />
<Compile Include="Services\SyncDiscoveryService.cs" />
<Compile Include="Services\Interfaces\ISyncDiscoveryService.cs" />
<Compile Include="Services\Interfaces\ISyncListenerService.cs" />
<Compile Include="Services\Interfaces\ISyncClientService.cs" />
<Compile Include="Services\SyncClientService.cs" />
<Compile Include="Services\AudioFileCacheService.cs" />
<Compile Include="Services\Interfaces\IAudioFileCacheService.cs" />
<Compile Include="Objects\LibraryQuery.cs" />
<Compile Include="Messages\AudioFileCacheUpdatedMessage.cs" />
<Compile Include="Objects\SyncDevice.cs" />
<Compile Include="Services\SyncListenerService.cs" />
<Compile Include="ISyncDeviceSpecifications.cs" />
<Compile Include="Services\UpdateLibraryService.cs" />
<Compile Include="Services\Interfaces\IUpdateLibraryService.cs" />
Expand Down
3 changes: 0 additions & 3 deletions MPfm/MPfm.Library/Services/SyncClientService.cs
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU General Public License
// along with MPfm. If not, see <http://www.gnu.org/licenses/>.

#if !WINDOWSSTORE && !WINDOWS_PHONE

using System;
using System.Collections.Generic;
using System.Net;
Expand Down Expand Up @@ -290,4 +288,3 @@ private string GetLibraryLocalPath(AudioFile audioFile)
}
}
}
#endif
3 changes: 0 additions & 3 deletions MPfm/MPfm.Library/Services/SyncDiscoveryService.cs
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU General Public License
// along with MPfm. If not, see <http://www.gnu.org/licenses/>.

#if !PCL && !WINDOWSSTORE && !WINDOWS_PHONE

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down Expand Up @@ -185,4 +183,3 @@ public void Cancel()
}
}
}
#endif
3 changes: 0 additions & 3 deletions MPfm/MPfm.Library/Services/SyncListenerService.cs
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU General Public License
// along with MPfm. If not, see <http://www.gnu.org/licenses/>.

// Another implementation will be added for these platforms.
#if !PCL && !WINDOWSSTORE && !WINDOWS_PHONE
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -624,4 +622,3 @@ public SyncDevice GetInternalSyncDevice()
}
}
}
#endif

0 comments on commit ba56a7c

Please sign in to comment.