当前位置: 首页>>代码示例>>C#>>正文


C# IArchiveStorage类代码示例

本文整理汇总了C#中IArchiveStorage的典型用法代码示例。如果您正苦于以下问题:C# IArchiveStorage类的具体用法?C# IArchiveStorage怎么用?C# IArchiveStorage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IArchiveStorage类属于命名空间,在下文中一共展示了IArchiveStorage类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BeginUpdate

		/// <summary>
		/// Begin updating to this <see cref="ZipFile"/> archive.
		/// </summary>
		/// <param name="archiveStorage">The storage to use during the update.</param>
		public void BeginUpdate(IArchiveStorage archiveStorage)
		{
			BeginUpdate(archiveStorage, new DynamicDiskDataSource());
		}
开发者ID:jamesbascle,项目名称:SharpZipLib,代码行数:8,代码来源:ZipFile.cs

示例2: BeginUpdate

		// Immediate updating
		//		TBD: Direct form of updating
		// 
		//		public void Update(IEntryMatcher deleteMatcher)
		//		{
		//		}
		//
		//		public void Update(IScanner addScanner)
		//		{
		//		}


		// Deferred Updating
		/// <summary>
		/// Begin updating this <see cref="BlubbFile"/> archive.
		/// </summary>
		/// <param name="archiveStorage">The <see cref="IArchiveStorage">archive storage</see> for use during the update.</param>
		/// <param name="dataSource">The <see cref="IDynamicDataSource">data source</see> to utilise during updating.</param>
		/// <exception cref="ObjectDisposedException">BlubbFile has been closed.</exception>
		/// <exception cref="ArgumentNullException">One of the arguments provided is null</exception>
		/// <exception cref="ObjectDisposedException">BlubbFile has been closed.</exception>
		public void BeginUpdate( IArchiveStorage archiveStorage, IDynamicDataSource dataSource ) {
			if( archiveStorage == null ) {
				throw new ArgumentNullException( "archiveStorage" );
			}

			if( dataSource == null ) {
				throw new ArgumentNullException( "dataSource" );
			}

			if( isDisposed_ ) {
				throw new ObjectDisposedException( "BlubbFile" );
			}

			if( IsEmbeddedArchive ) {
				throw new BlubbZipException( "Cannot update embedded/SFX archives" );
			}

			archiveStorage_ = archiveStorage;
			updateDataSource_ = dataSource;

			// NOTE: the baseStream_ may not currently support writing or seeking.

			updateIndex_ = new Hashtable();

			updates_ = new ArrayList( entries_.Length );
			foreach( BlubbZipEntry entry in entries_ ) {
				int index = updates_.Add( new BlubbUpdate( entry ) );
				updateIndex_.Add( entry.Name, index );
			}

			updateCount_ = updates_.Count;

			contentsEdited_ = false;
			commentEdited_ = false;
			newComment_ = null;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:57,代码来源:BlubbZipFile.cs

示例3: BeginUpdate

//		TBD: Direct form of updating
// 
//		public void Update(IEntryMatcher deleteMatcher)
//		{
//		}
//
//		public void Update(IScanner addScanner)
//		{
//		}
		#endregion
		#region Deferred Updating
		/// <summary>
		/// Begin updating this <see cref="ZipFile"/> archive.
		/// </summary>
		/// <param name="archiveStorage">The <see cref="IArchiveStorage">archive storage</see> for use during the update.</param>
		/// <param name="dataSource">The <see cref="IDynamicDataSource">data source</see> to utilise during updating.</param>
		public void BeginUpdate(IArchiveStorage archiveStorage, IDynamicDataSource dataSource)
		{
			if ( IsEmbeddedArchive ) {
				throw new ZipException ("Cannot update embedded/SFX archives");
			}

			if ( archiveStorage == null ) {
				throw new ArgumentNullException("archiveStorage");
			}

			if ( dataSource == null ) {
				throw new ArgumentNullException("dataSource");
			}

			archiveStorage_ = archiveStorage;
			updateDataSource_ = dataSource;

			// NOTE: the baseStream_ may not currently support writing or seeking.

			if ( entries_ != null ) {
				updates_ = new ArrayList(entries_.Length);
				foreach(ZipEntry entry in entries_) {
					updates_.Add(new ZipUpdate(entry));
				}
			}
			else {
				updates_ = new ArrayList();
			}

			contentsEdited_ = false;
			commentEdited_ = false;
			newComment_ = null;
		}
开发者ID:jiangguang5201314,项目名称:VMukti,代码行数:49,代码来源:ZipFile.cs

示例4: BeginUpdate

//		TBD: Direct form of updating
// 
//		public void Update(IEntryMatcher deleteMatcher)
//		{
//		}
//
//		public void Update(IScanner addScanner)
//		{
//		}
		#endregion
		
		#region Deferred Updating
		/// <summary>
		/// Begin updating this <see cref="ZipFile"/> archive.
		/// </summary>
		/// <param name="archiveStorage">The <see cref="IArchiveStorage">archive storage</see> for use during the update.</param>
		/// <param name="dataSource">The <see cref="IDynamicDataSource">data source</see> to utilise during updating.</param>
		/// <exception cref="ObjectDisposedException">ZipFile has been closed.</exception>
		/// <exception cref="ArgumentNullException">One of the arguments provided is null</exception>
		/// <exception cref="ObjectDisposedException">ZipFile has been closed.</exception>
		public void BeginUpdate(IArchiveStorage archiveStorage, IDynamicDataSource dataSource)
		{
			if ( archiveStorage == null ) {
				throw new ArgumentNullException("archiveStorage");
			}

			if ( dataSource == null ) {
				throw new ArgumentNullException("dataSource");
			}
			
			if ( _isDisposed ) {
				throw new ObjectDisposedException("ZipFile");
			}

			if ( IsEmbeddedArchive ) {
				throw new ZipException ("Cannot update embedded/SFX archives");
			}

			_archiveStorage = archiveStorage;
			_updateDataSource = dataSource;

			// NOTE: the baseStream_ may not currently support writing or seeking.

			_updateIndex = new Hashtable();

			_updates = new ArrayList(_entries.Length);
			foreach(ZipEntry entry in _entries) {
				int index = _updates.Add(new ZipUpdate(entry));
				_updateIndex.Add(entry.Name, index);
			}

			_updateCount = _updates.Count;

			_contentsEdited = false;
			_commentEdited = false;
			_newComment = null;
		}
开发者ID:marinehero,项目名称:ThinkAway.net,代码行数:57,代码来源:ZipFile.cs

示例5: BeginUpdate

 public void BeginUpdate(IArchiveStorage archiveStorage, IDynamicDataSource dataSource)
 {
     if (archiveStorage == null)
     {
         throw new ArgumentNullException("archiveStorage");
     }
     if (dataSource == null)
     {
         throw new ArgumentNullException("dataSource");
     }
     if (isDisposed_)
     {
         throw new ObjectDisposedException("ZipFile");
     }
     if (IsEmbeddedArchive)
     {
         throw new ZipException("Cannot update embedded/SFX archives");
     }
     archiveStorage_ = archiveStorage;
     updateDataSource_ = dataSource;
     updateIndex_ = new Hashtable();
     updates_ = new ArrayList(entries_.Length);
     foreach (ZipEntry entry in entries_)
     {
         int num = updates_.Add(new ZipUpdate(entry));
         updateIndex_.Add(entry.Name, num);
     }
     updates_.Sort(new UpdateComparer());
     int num2 = 0;
     foreach (ZipUpdate update in updates_)
     {
         if (num2 == (updates_.Count - 1))
         {
             break;
         }
         update.OffsetBasedSize = ((ZipUpdate)updates_[num2 + 1]).Entry.Offset - update.Entry.Offset;
         num2++;
     }
     updateCount_ = updates_.Count;
     contentsEdited_ = false;
     commentEdited_ = false;
     newComment_ = null;
 }
开发者ID:ouyh18,项目名称:LteTools,代码行数:43,代码来源:ZipFile.cs

示例6: BeginUpdate

 public void BeginUpdate(IArchiveStorage archiveStorage, IDynamicDataSource dataSource)
 {
     if (archiveStorage == null)
     {
         throw new ArgumentNullException(nameof(archiveStorage));
     }
     if (dataSource == null)
     {
         throw new ArgumentNullException(nameof(dataSource));
     }
     if (_isDisposed)
     {
         throw new ObjectDisposedException("ZipFile");
     }
     if (IsEmbeddedArchive)
     {
         throw new ZipException("Cannot update embedded/SFX archives");
     }
     _archiveStorage = archiveStorage;
     _updateDataSource = dataSource;
     _updateIndex = new Hashtable();
     _updates = new ArrayList(_entries.Length);
     foreach (var entry in _entries)
     {
         var num = _updates.Add(new ZipUpdate(entry));
         _updateIndex.Add(entry.Name, num);
     }
     _updates.Sort(new UpdateComparer());
     var num2 = 0;
     foreach (ZipUpdate update in _updates)
     {
         if (num2 == (_updates.Count - 1))
         {
             break;
         }
         update.OffsetBasedSize = ((ZipUpdate)_updates[num2 + 1]).Entry.Offset - update.Entry.Offset;
         num2++;
     }
     _updateCount = _updates.Count;
     _contentsEdited = false;
     _commentEdited = false;
     _newComment = null;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:43,代码来源:ZipFile.cs

示例7: PostUpdateCleanup

        void PostUpdateCleanup()
        {
            if( archiveStorage_!=null ) {
                archiveStorage_.Dispose();
                archiveStorage_=null;
            }

            updateDataSource_=null;
            updates_ = null;
            updateIndex_ = null;
        }
开发者ID:eopeter,项目名称:dmelibrary,代码行数:11,代码来源:ZipFile.cs

示例8: PostUpdateCleanup

 private void PostUpdateCleanup()
 {
     this.updateDataSource_ = null;
     this.updates_ = null;
     this.updateIndex_ = null;
     if (this.archiveStorage_ != null)
     {
         this.archiveStorage_.Dispose();
         this.archiveStorage_ = null;
     }
 }
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:11,代码来源:ZipFile.cs

示例9: PostUpdateCleanup

 private void PostUpdateCleanup()
 {
     _updateDataSource = null;
     _updates = null;
     _updateIndex = null;
     if (_archiveStorage != null)
     {
         _archiveStorage.Dispose();
         _archiveStorage = null;
     }
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:11,代码来源:ZipFile.cs


注:本文中的IArchiveStorage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。