Skip to content

Commit

Permalink
Remove logging from ContosoCookbook sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-- committed Jun 25, 2021
1 parent d4c245a commit 37d7035
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 48 deletions.
1 change: 0 additions & 1 deletion Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<PackageReference Update="Prism.Unity.Forms" Version="$(PrismVersion)" />
<PackageReference Update="Prism.DryIoc.Forms" Version="$(PrismVersion)" />
<PackageReference Update="Prism.Plugin.Popups" Version="7.2.0.1046" />
<PackageReference Update="Prism.Plugin.Logging.Abstractions" Version="8.0.11-beta" />
<PackageReference Update="Prism.Plugin.Logging.Loggly" Version="8.0.11-beta" />
<PackageReference Update="Xamarin.Forms" Version="4.8.0.1560" />
<PackageReference Update="Xamarin.Essentials" Version="1.5.3.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Prism.Ioc;
using Prism.Unity;
using Xamarin.Forms;
using Prism.Logging;
using ContosoCookbook.Views;
using ContosoCookbook.Services;
using Xamarin.Forms.Xaml;
Expand All @@ -29,7 +28,6 @@ protected override async void OnInitialized()

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterSingleton<ILogger, DebugLoggingService>();
containerRegistry.RegisterSingleton<IRecipeService, RecipeService>();

containerRegistry.RegisterForNavigation<NavigationPage>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Prism.Plugin.Logging.Abstractions" />
<PackageReference Include="Xamarin.Forms" />
<PackageReference Include="Prism.Unity.Forms" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Globalization;
using Prism.Logging;
using Xamarin.Forms;

namespace ContosoCookbook.Converters
Expand All @@ -15,20 +14,12 @@ static LocalImagePathConverter()
_assembly = typeof(LocalImagePathConverter).AssemblyQualifiedName.Split(',')[1].Trim() + '.';
}

private readonly ILogger _logger;

public LocalImagePathConverter(ILogger logger)
{
_logger = logger;
}

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// Convert an image-path string (e.g. "images/chinese/photo.jpg" into a resource ID
// (e.g. "ContosoCookbook.images.chinese.photo.jpg") and return an ImageSource
// wrapping that resource
string source = _assembly + ((string)value).Replace('/', '.');
_logger.Debug($"Getting image '{source}'");
return ImageSource.FromResource(source);
}

Expand Down

This file was deleted.

0 comments on commit 37d7035

Please sign in to comment.