コード例 #1
0
        private void LoadImplementationDirs()
        {
            var allImplDirs = StoreConfig.GetImplementationDirs().ToList();

            listBoxImplDirs.Items.AddRange(allImplDirs.Cast <object>().ToArray());

            var userImplDirs = StoreConfig.GetUserImplementationDirs();

            _lockedImplDirs = allImplDirs.Except(userImplDirs).ToList();
        }
コード例 #2
0
        /// <summary>
        /// Creates the store to provide to clients as a service.
        /// </summary>
        /// <exception cref="IOException">A cache directory could not be created or the underlying filesystem can not store file-changed times accurate to the second.</exception>
        /// <exception cref="UnauthorizedAccessException">Creating a cache directory is not permitted.</exception>
        private MarshalByRefObject CreateStore()
        {
            var identity = WindowsIdentity.GetCurrent();

            Debug.Assert(identity != null);

            var paths  = StoreConfig.GetImplementationDirs(serviceMode: true);
            var stores = paths.Select(path => new SecureStore(path, identity, eventLog)).Cast <IStore>();

            return(new CompositeStore(stores));
        }