This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MetricPlanner.Abstractions.Data; | |
using MetricPlanner.Abstractions.Data.Repositories; | |
using MetricPlanner.Data.Repositories; | |
using MetricPlanner.Domain.Models; | |
namespace MetricPlanner.Domain.Data.Repositories | |
{ | |
public sealed class LogRepository : BaseRepository<Log>, ILogRepository | |
{ | |
[Preserve] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MetricPlanner.Abstractions.Data; | |
using MetricPlanner.Abstractions.Data.Repositories; | |
using MetricPlanner.Models; | |
using LiteDB; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Threading.Tasks; | |
using MetricPlanner.Infrastructure.Helpers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0-3.final" PrivateAssets="all" /> | |
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" /> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications | |
{ | |
public partial class MyStartup : ShinyStartup | |
{ | |
... | |
public override void ConfigureServices(IServiceCollection services, IPlatform platform) | |
{ | |
// Adicionamos o uso das notificacoes | |
services.UseNotifications(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PushDelegate : IPushDelegate | |
{ | |
private readonly Lazy<INotificationManager> _notificationManager; | |
public PushDelegate(Lazy<INotificationManager> notificationManager) | |
{ | |
_notificationManager = notificationManager; | |
} | |
public async Task OnEntry(PushEntryArgs args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications.iOS | |
{ | |
[Register(nameof(AppDelegate))] | |
public class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate | |
{ | |
public override bool FinishedLaunching(UIApplication app, NSDictionary options) | |
{ | |
this.ShinyFinishedLaunching(new MyStartup()); | |
// Você pode inscrever em um tópico por padrão | |
FirebaseMessaging.Instance.SubscribeToTopic("all"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications.Droid | |
{ | |
[Application] | |
public class MainApplication : Application | |
{ | |
public MainApplication(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer) | |
{ | |
} | |
public override void OnCreate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications | |
{ | |
public class PushDelegate : IPushDelegate | |
{ | |
public async Task OnEntry(PushEntryArgs args) | |
{ | |
//Do something | |
} | |
public async Task OnReceived(IDictionary<string, string> data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Notifications | |
{ | |
public partial class MyStartup : ShinyStartup | |
{ | |
public static IContainer? Container { get; private set; } | |
public override void ConfigureServices(IServiceCollection services, IPlatform platform) | |
{ | |
services.UseFirebaseMessaging<PushDelegate>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="CollectionViewDemo.MainPage"> | |
<ContentPage.ToolbarItems> | |
<ToolbarItem IconImageSource="Pedido.png" | |
Priority="0" Order="Primary" | |
Command="{Binding AdicionarPedidoCommand}"/> | |
</ContentPage.ToolbarItems> |