System.IO.IsolatedStorage.IsolatedStorageFile.Initialize C# (CSharp) Method

Initialize() private method

private Initialize ( IsolatedStorageScope scope ) : void
scope IsolatedStorageScope
return void
        private void Initialize(IsolatedStorageScope scope)
        {
            // InitStore will set up the IdentityHash
            InitStore(scope, null, null);

            StringBuilder sb = new StringBuilder(Helper.GetRootDirectory(scope));
            sb.Append(SeparatorExternal);
            sb.Append(IdentityHash);
            sb.Append(SeparatorExternal);

            if (Helper.IsApplication(scope))
            {
                sb.Append(s_appFiles);
            }
            else if (Helper.IsDomain(scope))
            {
                sb.Append(s_files);
            }
            else
            {
                sb.Append(s_assemFiles);
            }
            sb.Append(SeparatorExternal);

            _rootDirectory = sb.ToString();
            Helper.CreateDirectory(_rootDirectory, scope);
        }

Usage Example

Esempio n. 1
0
        private static IsolatedStorageFile GetStore(IsolatedStorageScope scope)
        {
            IsolatedStorageFile isf = new IsolatedStorageFile();

            isf.Initialize(scope);
            return(isf);
        }
All Usage Examples Of System.IO.IsolatedStorage.IsolatedStorageFile::Initialize