Example #1
0
 public void Dispose()
 {
     if (FSGlobalContext != null)
     {
         FSGlobalContext.CloseConnection();
         FSGlobalFactory.Put(FSGlobalContext);
     }
 }
Example #2
0
 public void Dispose()
 {
     if (_global != null)
     {
         _global.CloseConnection();
         FSGlobalFactory.Put(_global);
         _global = null;
     }
 }
Example #3
0
        public FSScope(FSGlobalContext global)
        {
            if (global == null)
            {
                throw new ArgumentNullException(nameof(global));
            }

            FSGlobalContext = FSGlobalFactory.Get(global.Identity);
        }
Example #4
0
        public static bool Authenticate(NVIdentity identity)
        {
            var global = FSGlobalFactory.Get(identity);

            if (global != null)
            {
                identity.IsAuthenticated = true;

                FSGlobalFactory.Put(global);

                return(true);
            }

            return(false);
        }
Example #5
0
 //private readonly Func<FSGlobal, T> _factory;
 public FSDataContext(INVIdentityProvider provider)
 {
     _global = FSGlobalFactory.Get(provider.Get);
 }
Example #6
0
 public FSScope(NVIdentity identity)
 {
     FSGlobalContext = FSGlobalFactory.Get(identity);
 }