Skip to content

Commit

Permalink
Remove DefaultPlatformProvider and throw exception. Resolves #248
Browse files Browse the repository at this point in the history
  • Loading branch information
nigel-sampson committed Nov 16, 2015
1 parent c437f13 commit 5744025
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 97 deletions.
1 change: 0 additions & 1 deletion src/Caliburn.Micro/Caliburn.Micro.NET40.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<Compile Include="DeactivationEventArgs.cs" />
<Compile Include="DebugLog.cs" />
<Compile Include="DefaultCloseStrategy.cs" />
<Compile Include="DefaultPlatformProvider.cs" />
<Compile Include="DelegateResult.cs" />
<Compile Include="EnumerableExtensions.cs" />
<Compile Include="EventAggregator.cs" />
Expand Down
1 change: 0 additions & 1 deletion src/Caliburn.Micro/Caliburn.Micro.SL5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
<Compile Include="DeactivationEventArgs.cs" />
<Compile Include="DebugLog.cs" />
<Compile Include="DefaultCloseStrategy.cs" />
<Compile Include="DefaultPlatformProvider.cs" />
<Compile Include="DelegateResult.cs" />
<Compile Include="EnumerableExtensions.cs" />
<Compile Include="EventAggregator.cs" />
Expand Down
1 change: 0 additions & 1 deletion src/Caliburn.Micro/Caliburn.Micro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<Compile Include="DeactivationEventArgs.cs" />
<Compile Include="DebugLog.cs" />
<Compile Include="DefaultCloseStrategy.cs" />
<Compile Include="DefaultPlatformProvider.cs" />
<Compile Include="DelegateResult.cs" />
<Compile Include="EnumerableExtensions.cs" />
<Compile Include="EventAggregator.cs" />
Expand Down
91 changes: 0 additions & 91 deletions src/Caliburn.Micro/DefaultPlatformProvider.cs

This file was deleted.

13 changes: 10 additions & 3 deletions src/Caliburn.Micro/PlatformProvider.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
namespace Caliburn.Micro {
using System;

namespace Caliburn.Micro {
/// <summary>
/// Access the current <see cref="IPlatformProvider"/>.
/// </summary>
public static class PlatformProvider {
private static IPlatformProvider current = new DefaultPlatformProvider();
private static IPlatformProvider current;

/// <summary>
/// Gets or sets the current <see cref="IPlatformProvider"/>.
/// </summary>
public static IPlatformProvider Current {
get { return current; }
get
{
if (current == null)
throw new InvalidOperationException("PlatformProvider.Current is not set, ensure Caliburn.Micro is correctly initialized");
return current;
}
set { current = value; }
}
}
Expand Down

0 comments on commit 5744025

Please sign in to comment.