<|start_filename|>TipCalc/TipCalc.iOS/AppDelegate.cs<|end_filename|>
﻿using Foundation;
using UIKit;
using TipCalc.Core;
using MvvmCross.Platforms.Ios.Core;

namespace TipCalc.iOS
{
    [Register(nameof(AppDelegate))]
    public class AppDelegate : MvxApplicationDelegate<Setup, App>
    {
        public override UIWindow Window { get; set; }

        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            var result = base.FinishedLaunching(application, launchOptions);

            return result;
        }
    }
}

<|start_filename|>TipCalc/TipCalc.iOS/Setup.cs<|end_filename|>
﻿using TipCalc.Core;
using MvvmCross.Platforms.Ios.Core;
using Microsoft.Extensions.Logging;
using Serilog.Extensions.Logging;
using Serilog;

namespace TipCalc.iOS
{
    public class Setup : MvxIosSetup<App>
    {
        protected override ILoggerProvider CreateLogProvider()
        {
            return new SerilogLoggerProvider();
        }

        protected override ILoggerFactory CreateLogFactory()
        {
            // serilog configuration
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.NSLog()
                .CreateLogger();

            return new SerilogLoggerFactory();
        }
    }
}

<|start_filename|>TipCalc/TipCalc.UI.Mac/AppDelegate.cs<|end_filename|>
﻿using AppKit;
using Foundation;
using MvvmCross.Platforms.Mac.Core;

namespace TipCalc.UI.Mac
{
    [Register("AppDelegate")]
	public class AppDelegate : MvxApplicationDelegate<Setup, Core.App>
	{
		public NSWindow Window { get; set; }

		public override void DidFinishLaunching(NSNotification notification)
		{
			MvxMacSetupSingleton.EnsureSingletonAvailable(this).EnsureInitialized();
			RunAppStart();
		}

		public override void WillTerminate(NSNotification notification)
		{
			// Insert code here to tear down your application
		}
	}
}



<|start_filename|>TipCalc/TipCalc.Forms.iOS/AppDelegate.cs<|end_filename|>
﻿using Foundation;
using MvvmCross.Forms.Platforms.Ios.Core;
using TipCalc.Core;
using TipCalc.Forms.UI;
using UIKit;

namespace TipCalc.Forms.iOS
{
    [Register(nameof(AppDelegate))]
    public partial class AppDelegate : MvxFormsApplicationDelegate<Setup, App, FormsApp>
    {
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            return base.FinishedLaunching(uiApplication, launchOptions);
        }
    }
}


<|start_filename|>TipCalc/TipCalc.UI.Mac/Setup.cs<|end_filename|>
﻿using Microsoft.Extensions.Logging;
using MvvmCross.Platforms.Mac.Core;
using Serilog;
using Serilog.Extensions.Logging;

namespace TipCalc.UI.Mac
{
    public class Setup : MvxMacSetup<Core.App>
    {
		protected override ILoggerProvider CreateLogProvider()
		{
			return new SerilogLoggerProvider();
		}

		protected override ILoggerFactory CreateLogFactory()
		{
			// serilog configuration
			Log.Logger = new LoggerConfiguration()
				.MinimumLevel.Debug()
				.WriteTo.NSLog()
				.CreateLogger();

			return new SerilogLoggerFactory();
		}
	}
}



<|start_filename|>TipCalc/TipCalc.Forms.Droid/Setup.cs<|end_filename|>
﻿using Microsoft.Extensions.Logging;
using MvvmCross.Forms.Platforms.Android.Core;
using Serilog;
using Serilog.Extensions.Logging;
using TipCalc.Core;
using TipCalc.Forms.UI;

namespace TipCalc.Forms.Droid
{
    public class Setup : MvxFormsAndroidSetup<App, FormsApp>
    {
        protected override ILoggerProvider CreateLogProvider()
        {
            return new SerilogLoggerProvider();
        }

        protected override ILoggerFactory CreateLogFactory()
        {
            // serilog configuration
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.AndroidLog()
                .CreateLogger();

            return new SerilogLoggerFactory();
        }
    }
}


<|start_filename|>TipCalc/TipCalc.WPF/Views/TipView.xaml.cs<|end_filename|>
﻿using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
using TipCalc.Core.ViewModels;

namespace TipCalc.WPF.Views
{
    [MvxContentPresentation]
    [MvxViewFor(typeof(TipViewModel))]
    public partial class TipView : MvxWpfView
    {
        public TipView()
        {
            InitializeComponent();
        }
    }
}

<|start_filename|>TipCalc/TipCalc.UWP/App.xaml.cs<|end_filename|>
﻿using MvvmCross.Platforms.Uap.Views;

namespace TipCalc.UWP
{
    public sealed partial class App
    {
        public App()
        {
            InitializeComponent();
        }
    }

    public abstract class TipCalcApp : MvxApplication<Setup, Core.App>
    {
    }
}

<|start_filename|>TipCalc/TipCalc.UWP/Setup.cs<|end_filename|>
﻿using Microsoft.Extensions.Logging;
using MvvmCross.Platforms.Uap.Core;
using Serilog;
using Serilog.Extensions.Logging;

namespace TipCalc.UWP
{
    public class Setup : MvxWindowsSetup<Core.App>
    {
        protected override ILoggerProvider CreateLogProvider()
        {
            return new SerilogLoggerProvider();
        }

        protected override ILoggerFactory CreateLogFactory()
        {
            // serilog configuration
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.Trace()
                .CreateLogger();

            return new SerilogLoggerFactory();
        }
    }
}