Exemplo n.º 1
0
            private Impl(NotifierConfiguration config, AsyncContextThread notificationsThread)
            {
                _handlers            = config.Handlers.ToArray();
                _notificationsThread = notificationsThread;
                _gcHandle            = GCHandle.Alloc(this);
                Configuration        = config;
                _start = new TaskCompletionSource <INotifier>();
                try
                {
                    _notifierHandle = NotifierHandle.CreateHandle(_gcHandle, config);
                }
                catch
                {
                    _gcHandle.Free();
                    throw;
                }

                _processor = new CalculationProcessor <string, IntPtr>(CalculateAsync);
            }
Exemplo n.º 2
0
        public Realm GetRealmForWriting()
        {
            var config = new NotifierRealmConfiguration(NotifierHandle.GetRealmForWriting(CurrentRealm.SharedRealmHandle), CurrentRealm.Config.DatabasePath);

            return(Realm.GetInstance(config));
        }