public CeoPersonaAsistantService(ISlackService slackService, IFirebaseService firebaseService
                                  , IConfiguration configuration)
 {
     _slackService    = slackService;
     _firebaseService = firebaseService;
     _ceoMemberId     = configuration["SlackSettings:CeoMemberId"];
 }
        /// <summary>
        /// Trace with firebase
        /// </summary>
        /// <param name="returnArgumentsTracingModel">Return arguments tracing model</param>
        public void TraceWithFirebase(ReturnArgumentsTracingModel returnArgumentsTracingModel)
        {
            firebaseService = DependencyService.Get <IFirebaseService>();

            firebaseService.SetUserId(returnArgumentsTracingModel.UserId);
            firebaseService.ReportHandledException(returnArgumentsTracingModel.Exception);
            firebaseService.ReportUnHandledException(returnArgumentsTracingModel.Exception);
            firebaseService.LogEvent(returnArgumentsTracingModel.EventName);
            firebaseService.SetCurrentScreen(returnArgumentsTracingModel.ScreenName);
            firebaseService.LogActivity(Message, returnArgumentsTracingModel.EndLogging);

            if (returnArgumentsTracingModel.LogData != null && returnArgumentsTracingModel.LogData.Count > 0)
            {
                foreach (var parameter in returnArgumentsTracingModel.LogData)
                {
                    firebaseService.SetLogData(parameter.Key, parameter.Value);
                }
            }

            // TODO: Localization
            DependencyService.Get <IAlertManager>()
            .ShowAlert(returnArgumentsTracingModel.Exception.Message,
                       "Error",
                       "OK");
        }
Example #3
0
 public CoreDataController(
     IUsersService usersService,
     IDepartmentsService departmentsService,
     IUserProfileService userProfileService,
     IUnitsService unitsService,
     IDepartmentGroupsService departmentGroupsService,
     IPersonnelRolesService personnelRolesService,
     ICustomStateService customStateService,
     IPermissionsService permissionsService,
     ICallsService callsService,
     IFirebaseService firebaseService,
     IDepartmentSettingsService departmentSettingsService
     )
 {
     _usersService              = usersService;
     _departmentsService        = departmentsService;
     _userProfileService        = userProfileService;
     _unitsService              = unitsService;
     _departmentGroupsService   = departmentGroupsService;
     _personnelRolesService     = personnelRolesService;
     _customStateService        = customStateService;
     _permissionsService        = permissionsService;
     _callsService              = callsService;
     _firebaseService           = firebaseService;
     _departmentSettingsService = departmentSettingsService;
 }
Example #4
0
 public LeaveApplyPageViewModel(INavigationService navigationService, IFirebaseService firebaseService) : base(navigationService, firebaseService)
 {
     ApplyLeaveCommand = new DelegateCommand(ApplyLeave, CanApplyLeave);
     _user             = PrismApplicationBase.Current.Container.Resolve(typeof(User)) as User;
     UserName          = _user.UserName;
     LeaveDate         = DateTime.Now;
 }
 public ChampionScriptService(IFirebaseService firebaseService, ICacheService cacheService, IChampionService championService, IScriptInfoService scriptInfoService)
 {
     _firebaseService   = firebaseService;
     _cacheService      = cacheService;
     _championService   = championService;
     _scriptInfoService = scriptInfoService;
 }
Example #6
0
 public FacePersonController(ILogger <FacePersonController> logger, IFirebaseService firebase, ICognitiveVisionService cognitivevision, IOptions <AzureStorageConfiguration> azureStorage)
 {
     _logger          = logger;
     _cognitivevision = cognitivevision;
     _azureStorage    = azureStorage.Value ?? throw new ArgumentNullException(nameof(azureStorage));
     _firebase        = firebase;
 }
Example #7
0
        public RestService(IDataManagerService dataManagerService, IFirebaseService firebaseService)
        {
            _dataManagerService = dataManagerService;
            _firebaseService    = firebaseService;

            _httpClient = new HttpClient();
        }
 public NotificationService(IServiceProvider serviceProvider, IFirebaseService firebase, ConnectionsService connections, IOptions <FcmOptions> options)
 {
     this.serviceProvider = serviceProvider;
     this.firebase        = firebase;
     this.connections     = connections;
     this.options         = options;
 }
Example #9
0
 public CourierServiceDeliveryController(ICurrentUserService currentUserService,
                                         ApplicationDbContext context,
                                         IFirebaseService firebase)
 {
     this.currentUserService = currentUserService;
     this.context            = context;
     this.firebase           = firebase;
 }
Example #10
0
        private void RegisterForRemoteNotifications()
        {
            // Register your app for remote notifications.
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // iOS 10 or later
                var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
                UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) => {
                    //Console.WriteLine(granted);
                    Logger.Trace(granted.ToString());
                });

                // For iOS 10 display notification (sent via APNS)
                UNUserNotificationCenter.Current.Delegate = this;

                // For iOS 10 data message (sent via FCM)
                //Messaging.SharedInstance.RemoteMessageDelegate = this;
                Messaging.SharedInstance.Delegate = this;
            }
            else
            {
                // iOS 9 or before
                var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
                var settings             = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null);
                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }

            UIApplication.SharedApplication.RegisterForRemoteNotifications();
            Messaging.SharedInstance.Subscribe("All");

            InstanceId.Notifications.ObserveTokenRefresh((sender, e) => {
                // Note that this callback will be fired everytime a new token is generated, including the first
                // time. So if you need to retrieve the token as soon as it is available this is where that
                // should be done.
                var refreshedToken = InstanceId.SharedInstance.Token;

                Logger.Trace("TOKEN: " + refreshedToken);

                IFirebaseService firebaseService = Mvx.Resolve <IFirebaseService>();
                IRestService restService         = Mvx.Resolve <IRestService>();
                firebaseService.RefreshedToken   = refreshedToken;
                restService.UpdateRefreshedTokenAsync();
            });

            Messaging.SharedInstance.ShouldEstablishDirectChannel = true;

            //Messaging.SharedInstance.Connect(error => {
            //    if (error != null)
            //    {
            //        // Handle if something went wrong while connecting
            //    }
            //    else
            //    {
            //        // Let the user know that connection was successful
            //    }
            //});
        }
        public LeaveViewerPageViewModel(INavigationService navigationService, IFirebaseService firebaseService, IPageDialogService dialogService)
            : base(navigationService, firebaseService, dialogService)
        {
            Title = "View Leaves";

            ViewCommand       = new DelegateCommand(ViewLeaves, CanView);
            ItemTappedCommand = new DelegateCommand <CalendarItem>(DisplayLeaveDetails);
            IsVisible         = true;
        }
 public MessagesController()
 {
     _service     = new FirebaseService(Environment.GetEnvironmentVariable("DatabaseEndpoint"));
     _yelpService = new YelpService(
         Environment.GetEnvironmentVariable("YelpClientId"),
         Environment.GetEnvironmentVariable("YelpClientSecret"),
         Environment.GetEnvironmentVariable("YelpPreferredLocation")
         );
 }
Example #13
0
 /// <summary>
 /// Operations to perform against the security sub-system
 /// </summary>
 public SecurityController(IDepartmentsService departmentsService, IDepartmentGroupsService departmentGroupsService,
                           IPermissionsService permissionsService, IPersonnelRolesService personnelRolesService, IFirebaseService firebaseService)
 {
     _departmentsService      = departmentsService;
     _departmentGroupsService = departmentGroupsService;
     _permissionsService      = permissionsService;
     _personnelRolesService   = personnelRolesService;
     _firebaseService         = firebaseService;
 }
Example #14
0
 public FirebaseAuthenticationHandler(
     IOptionsMonitor <ValidateAuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     IFirebaseService firebaseService)
     : base(options, logger, encoder, clock)
 {
     _firebaseService = firebaseService;
 }
Example #15
0
        //
        public void DidRefreshRegistrationToken(Messaging messaging, string fcmToken)
        {
            Logger.Trace("TOKEN void: " + fcmToken);

            IFirebaseService firebaseService = Mvx.Resolve <IFirebaseService>();
            IRestService     restService     = Mvx.Resolve <IRestService>();

            firebaseService.RefreshedToken = fcmToken;
            restService.UpdateRefreshedTokenAsync();
        }
Example #16
0
 public CompanyService(GenericRepo <Kompania> companyRepo, GenericRepo <Prosba> requestRepo, RoleService roleService,
                       GenericRepo <Zolnierz> soldierRepo, UserManager <SystemUser> userManager, IFirebaseService firebaseService)
 {
     _userManager     = userManager;
     _roleService     = roleService;
     _companyRepo     = companyRepo;
     _requestRepo     = requestRepo;
     _soldierRepo     = soldierRepo;
     _firebaseService = firebaseService;
 }
Example #17
0
 public MainController(
     IService <EntryLogViewModel, EntryLog> entryLogService,
     IService <StoredPlateViewModel, StoredPlate> storedPlateService,
     IFirebaseService firebaseService,
     IGateService gateService)
 {
     this.entryLogService    = entryLogService;
     this.storedPlateService = storedPlateService;
     this.firebaseService    = firebaseService;
     this.gateService        = gateService;
 }
Example #18
0
 public PlatoonService(GenericRepo <Pluton> platoonRepo, GenericRepo <Prosba> requestRepo, IFirebaseService firebaseService,
                       GenericRepo <Zolnierz> soldierRepo, UserManager <SystemUser> userManager, ICompanyService companyService, RoleService roleService)
 {
     _userManager     = userManager;
     _roleService     = roleService;
     _platoonRepo     = platoonRepo;
     _requestRepo     = requestRepo;
     _soldierRepo     = soldierRepo;
     _companyService  = companyService;
     _firebaseService = firebaseService;
 }
Example #19
0
 public VocabularyController(IFirebaseService firbaseService
                             , IOxforDictionaryService oxfordDictionaryService
                             , ITranslateService translateService
                             , ISearchImageService searchImageService
                             , IMapper mapper) : base(mapper)
 {
     _firebaseService         = firbaseService;
     _oxfordDictionaryService = oxfordDictionaryService;
     _translateService        = translateService;
     _searchImageService      = searchImageService;
 }
Example #20
0
 public UserService(UserManager <SystemUser> userManager, IPasswordHasher <SystemUser> passwordHasher, IConfiguration configuration,
                    SignInManager <SystemUser> signInManager, GenericRepo <Zolnierz> pchorRepo, ISoldierService soldierService, IFirebaseService firebaseService)
 {
     _userManager     = userManager;
     _passwordHasher  = passwordHasher;
     _signInManager   = signInManager;
     _pchorRepo       = pchorRepo;
     _soldierService  = soldierService;
     _configuration   = configuration;
     _firebaseService = firebaseService;
 }
 public ReferralLinksService(
     IReferralLinkRepository referralLinkRepository,
     IFirebaseService firebaseService,
     ReferralLinksSettings settings,
     ILog log)
 {
     _referralLinkRepository = referralLinkRepository;
     _firebaseService        = firebaseService;
     _settings = settings;
     _log      = log;
 }
Example #22
0
 public ReleaseCommandHandler(IFirebaseService firebaseClient, IConfiguration config, IWithinReleaseService releaseService, IGitHubService githubService, ICardCreator cardCreator, IRepositoryMapper mapper, IFirebaseLogger logger)
 {
     this.service            = firebaseClient;
     this.config             = config;
     this.releaseMessageText = config["ReleaseBatonText"];
     this.appId          = config["MicrosoftAppId"];
     this.releaseService = releaseService;
     this.githubService  = githubService;
     this.cardCreator    = cardCreator;
     this.logger         = logger;
     this.mapper         = mapper;
 }
Example #23
0
        public MasterBuildController(IBotFrameworkHttpAdapter adapter, IConfiguration configuration, IFirebaseService firebaseClient, IRepositoryMapper mapper)
        {
            this.adapter = adapter;
            this.appId = configuration["MicrosoftAppId"];
            this.service = firebaseClient;
            this.mapper = mapper;

            if (string.IsNullOrEmpty(this.appId))
            {
                this.appId = Guid.NewGuid().ToString(); //if no AppId, use a random Guid
            }
        }
Example #24
0
        public TimerCheckController(IBotFrameworkHttpAdapter adapter, IConfiguration configuration, IFirebaseService firebaseClient)
        {
            this.adapter             = adapter;
            this.appId               = configuration["MicrosoftAppId"];
            this.timerCheckAllowance = Int32.Parse(configuration["TimerCheckAllowance"]);
            this.service             = firebaseClient;

            if (string.IsNullOrEmpty(this.appId))
            {
                this.appId = Guid.NewGuid().ToString(); //if no AppId, use a random Guid
            }
        }
 public SettingsViewModel(IVersionTracking versionTracking, IPermissions permissions, IUserDialogs userDialogs,
                          IPreferences preferences, IMvxMessenger messenger, ISecureStorage secureStorage, ILoginProvider loginProvider,
                          IFirebaseService firebaseService)
 {
     _versionTracking = versionTracking;
     _permissions     = permissions;
     _userDialogs     = userDialogs;
     _preferences     = preferences;
     _messenger       = messenger;
     _secureStorage   = secureStorage;
     _loginProvider   = loginProvider;
     _firebaseService = firebaseService;
 }
Example #26
0
 public HomeController(IMyCache cache, IChampionScriptService championScriptService,
                       ILoginService loginService, IRatingService ratingService,
                       IFirebaseService firebaseService,
                       IResponseServerService responseServerService
                       )
 {
     _cache = cache;
     _championScriptService = championScriptService;
     _loginService          = loginService;
     _ratingService         = ratingService;
     _firebaseService       = firebaseService;
     _responseServerService = responseServerService;
 }
        public ExpenseListPageViewModel(IExpenseTrackerService expenseTrackerService, INavigationService navigationService, IPageDialogService pageDialogService,
                                        IFirebaseService firebaseService, IUserSettings userSettings, ITelemetry telemetry)
        {
            _expenseTrackerService = expenseTrackerService;
            _pageDialogService     = pageDialogService;
            _navigationService     = navigationService;
            _firebaseService       = firebaseService;
            _userSettings          = userSettings;

            _telemetry = telemetry;

            ExpenseList = new ObservableCollection <Expense>();
        }
        public SomeonesMergedController(IBotFrameworkHttpAdapter adapter, IConfiguration configuration, IFirebaseService firebaseClient,
                                        ICardCreator cardCreator, IRepositoryMapper repoMapper)
        {
            this.service     = firebaseClient;
            this.adapter     = adapter;
            this.appId       = configuration["MicrosoftAppId"];
            this.cardCreator = cardCreator;
            this.repoMapper  = repoMapper;

            if (string.IsNullOrEmpty(appId))
            {
                this.appId = Guid.NewGuid().ToString(); //if no AppId, use a random Guid
            }
        }
        public override void OnTokenRefresh()
        {
            string refreshedToken = FirebaseInstanceId.Instance.Token;

            Logger.Trace("TOKEN: " + refreshedToken);

            IFirebaseService firebaseService = Mvx.Resolve <IFirebaseService>();
            IRestService     restService     = Mvx.Resolve <IRestService>();

            firebaseService.RefreshedToken = refreshedToken;
            restService.UpdateRefreshedTokenAsync();

            base.OnTokenRefresh();
        }
        public ConfiguracoesPageViewModel(INavigationService navigationService,
                                          IOpenWeatherService openWeatherService,
                                          IFirebaseService firebaseService,
                                          IPageDialogService pageDialogService) : base(navigationService)
        {
            _openWeatherService = openWeatherService;
            _firebaseService    = firebaseService;
            _pageDialogService  = pageDialogService;

            ClimaAtual = new ClimaAtual();

            Title = "Configurações";

            SalvarConfiguracoesCommand = new DelegateCommand(async() => await SalvarConfiguracoes(), PodeExecutarSalvarConfiguracoesCommand);
        }