Exemplo n.º 1
0
        private bool disposedValue;         // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // dispose managed state (managed objects).
                    _reader = null;
                    ChattelCleanup.CleanLocalStorageFolder(LOCAL_STORAGE_DIR_INFO);
                }

                // free unmanaged resources (unmanaged objects) and override a finalizer below.
                // set large fields to null.

                disposedValue = true;
            }
        }
Exemplo n.º 2
0
        public TestLocalRead(uint assetDataSize)
        {
            _dataSize = assetDataSize;

            ChattelCleanup.CleanLocalStorageFolder(LOCAL_STORAGE_DIR_INFO);

            ChattelCleanup.CreateLocalStorageFolder(LOCAL_STORAGE_DIR_INFO);
            var config = new ChattelConfiguration(LOCAL_STORAGE_DIR_INFO.FullName);

            _reader = new ChattelReader(config);

            ChattelCleanup.CreateLocalStorageEntry(LOCAL_STORAGE_DIR_INFO, new InWorldz.Data.Assets.Stratus.StratusAsset {
                Id   = _knownAssetId = Guid.NewGuid(),
                Name = "Adama",
                Data = new byte[_dataSize],
            });
        }