public App() { // SfdcSDK InitializeSfdcConfig(); SDKManager.CreateClientManager(false); SDKManager.RootApplicationPage = typeof(VisualBrowserPage); SDKManager.EndLoginCallBack = () => { Messenger.Default.Send(new UserLogInMessage()); }; PlatformAdapter.Resolve <ISFApplicationHelper>().Initialize(); // Set up the Logging Service and the custom log action function in the PlatformAdapter var target = new LogFileTarget(); target.RetainDays = 10; LoggingServices.DefaultConfiguration.AddTarget(LoggingLevel.Information, target); PlatformAdapter.SetCustomLoggerAction(LoggingServices.LogAction); // Continue App setup InitializeComponent(); Suspending += OnSuspending; Resuming += OnResuming; // Setup the global crash handler GlobalCrashHandler.Configure(); }
protected SalesforceApplication() { Suspending += OnSuspending; InitializeConfig(); SDKManager.CreateClientManager(false); SDKManager.RootApplicationPage = SetRootApplicationPage(); TokenRefresher = new DispatcherTimer { Interval = TimeSpan.FromMinutes(3) }; TokenRefresher.Tick += RefreshToken; PlatformAdapter.Resolve <ISFApplicationHelper>().Initialize(); }
protected SalesforceApplication() { SFApplicationHelper.RegisterServices(); Suspending += OnSuspending; InitializeConfig(); SDKManager.CreateClientManager(false); SDKManager.RootApplicationPage = SetRootApplicationPage(); TokenRefresher = new DispatcherTimer { Interval = TimeSpan.FromMinutes(TokenRefreshInterval) }; TokenRefresher.Tick += RefreshToken; AppHelper.Initialize(); }
protected SalesforceApplication() { SFApplicationHelper.RegisterServices(); SDKServiceLocator.RegisterService <ILoggingService, Logger>(); Suspending += OnSuspending; //do upgrade on stored config, account and pincode UpgradeConfigAsync().Wait(); SDKUpgradeManager.GetInstance().UpgradeAsync().Wait(); InitializeConfig(); SDKManager.CreateClientManager(false); SDKManager.RootApplicationPage = SetRootApplicationPage(); TokenRefresher = new DispatcherTimer { Interval = TimeSpan.FromMinutes(TokenRefreshInterval) }; TokenRefresher.Tick += RefreshToken; AppHelper.Initialize(); }