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


C# ArchiveFormat类代码示例

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


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

示例1: PscxSevenZipExtractor

 internal PscxSevenZipExtractor(PscxCmdlet command, FileInfo file, bool passThru, ArchiveFormat format) :
     base(command, file, format)
 {
     _passThru = passThru;
     _entries = new List<ArchiveEntry>();
     foreach (ArchiveEntry entry in this){
         _entries.Add(entry);
     }
 }
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:PscxSevenZipExtractor.cs

示例2: Archive

        // Archive object for creation
        public Archive(ArchiveFormat format, string filename)
        {
            // Set up information
            Name      = null;
            Extension = null;
            Filename  = filename;
            Format    = format;

            InitalizePacker();
        }
开发者ID:memerdot,项目名称:puyotools,代码行数:11,代码来源:Archive.cs

示例3: ArchiveEntry

        internal ArchiveEntry(IArchiveEntry archiveEntry, string archivePath, ArchiveFormat archiveFormat)
        {
            Index = (uint) archiveEntry.Index;
            Path = archiveEntry.FilePath;
            Size = (ulong)archiveEntry.Size;
			Name = System.IO.Path.GetFileName(archiveEntry.FilePath);
            CompressedSize = 0; // Not supported in SevenZipSharp (yet)
            ModifiedDate = archiveEntry.LastModifiedTime.GetValueOrDefault ();            
            IsEncrypted = archiveEntry.IsEncrypted;
            IsFolder = archiveEntry.IsDirectory;
            ArchivePath = archivePath;
            Format = archiveFormat;
            CRC = archiveEntry.Crc;
			UnderlyingObject = archiveEntry;
        }
开发者ID:nickchal,项目名称:pash,代码行数:15,代码来源:ArchiveEntry.cs

示例4: GetArchiveLinkRequest

        public GetArchiveLinkRequest(string accountName, string repositoryName, Revision revision, ArchiveFormat format = ArchiveFormat.Zipball)
        {
            #region Preconditions

            if (accountName == null)
                throw new ArgumentNullException(nameof(accountName));

            if (repositoryName == null)
                throw new ArgumentNullException(nameof(repositoryName));

            #endregion

            AccountName = accountName;
            RepositoryName = repositoryName;
            Revision = revision;
            Format = format;
        }
开发者ID:carbon,项目名称:Platform,代码行数:17,代码来源:GetArchiveLinkRequest.cs

示例5: GetArchive

        /// <summary>
        /// Get an archive of a given repository's contents, in a specific format
        /// </summary>
        /// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
        /// <param name="reference">A valid Git reference.</param>
        /// <param name="timeout"> Time span until timeout </param>
        /// <returns>The binary contents of the archive</returns>
        public IObservable<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.GreaterThanZero(timeout, "timeout");

            return _client.Repository.Content.GetArchive(owner, name, archiveFormat, reference, timeout).ToObservable();
        }
开发者ID:LiyeXu,项目名称:octokit.net,代码行数:18,代码来源:ObservableRepositoryContentsClient.cs

示例6: GetArchiveLink

        public IObservable<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return _client.Repository.Content.GetArchiveLink(owner, name, archiveFormat, reference).ToObservable();
        }
开发者ID:LiyeXu,项目名称:octokit.net,代码行数:7,代码来源:ObservableRepositoryContentsClient.cs

示例7: RepositoryArchiveLink

 public static Uri RepositoryArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference)
 {
     return "repos/{0}/{1}/{2}/{3}".FormatUri(owner, name, archiveFormat.ToParameter(), reference);
 }
开发者ID:cloudRoutine,项目名称:octokit.net,代码行数:4,代码来源:ApiUrls.cs

示例8: GetArchive

        /// <summary>
        /// Get an archive of a given repository's contents, in a specific format
        /// </summary>
        /// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
        /// <param name="reference">A valid Git reference.</param>
        /// <param name="timeout"> Time span until timeout </param>
        /// <returns>The binary contents of the archive</returns>
        public async Task<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.GreaterThanZero(timeout, "timeout");

            var endpoint = ApiUrls.RepositoryArchiveLink(owner, name, archiveFormat, reference);

            var response = await Connection.Get<byte[]>(endpoint, timeout).ConfigureAwait(false);

            return response.Body;
        }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:22,代码来源:RepositoryContentsClient.cs

示例9: GetArchiveLink

        /// <summary>
        /// This method will return a 302 to a URL to download a tarball or zipball archive for a repository.
        /// Please make sure your HTTP framework is configured to follow redirects or you will need to use the 
        /// Location header to make a second GET request.
        /// Note: For private repositories, these links are temporary and expire quickly.
        /// </summary>
        /// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
        /// <param name="reference">A valid Git reference.</param>
        /// <returns></returns>
        public Task<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return ApiConnection.GetRedirect(ApiUrls.RepositoryArchiveLink(owner, name, archiveFormat, reference));
        }
开发者ID:naveensrinivasan,项目名称:octokit.net,代码行数:19,代码来源:RepositoryContentsClient.cs

示例10: GetArchive

        /// <summary>
        /// Get an archive of a given repository's contents, in a specific format
        /// </summary>
        /// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
        /// <param name="reference">A valid Git reference.</param>
        /// <param name="timeout"> Time span until timeout </param>
        public async Task<byte[]> GetArchive(int repositoryId, ArchiveFormat archiveFormat, string reference, TimeSpan timeout)
        {
            Ensure.ArgumentNotNull(reference, "reference");
            Ensure.GreaterThanZero(timeout, "timeout");

            var endpoint = ApiUrls.RepositoryArchiveLink(repositoryId, archiveFormat, reference);

            var response = await Connection.Get<byte[]>(endpoint, timeout).ConfigureAwait(false);

            return response.Body;
        }
开发者ID:rlugojr,项目名称:octokit.net,代码行数:19,代码来源:RepositoryContentsClient.cs

示例11: LuciArchive

 public LuciArchive(ArcView arc, ArchiveFormat impl, ICollection<Entry> dir, EncryptionScheme scheme, LpkInfo info)
     : base(arc, impl, dir)
 {
     Info = info;
     Scheme = scheme;
 }
开发者ID:Casidi,项目名称:GARbro,代码行数:6,代码来源:ArcLPK.cs

示例12: DxArchive

 public DxArchive(ArcView arc, ArchiveFormat impl, ICollection<Entry> dir, byte[] key)
     : base(arc, impl, dir)
 {
     Key = key;
 }
开发者ID:Casidi,项目名称:GARbro,代码行数:5,代码来源:ArcDX.cs

示例13: GetArchiveLinkRequest

 public GetArchiveLinkRequest(string userName, string nameOfRepository, ArchiveFormat formatOfArchive, string @ref)
     : base(string.Format("/repos/{0}/{1}/{2}/{3}", userName, nameOfRepository, formatOfArchive.ToString().ToLower(), @ref))
 {
 }
开发者ID:KjWhal,项目名称:KjWhal.GitHubProto,代码行数:4,代码来源:GetArchiveLinkRequest.cs

示例14: AzArchive

 public AzArchive(ArcView arc, ArchiveFormat impl, ICollection<Entry> dir, uint syskey, uint regkey)
     : base(arc, impl, dir)
 {
     SysenvKey = syskey;
     RegularKey = regkey;
 }
开发者ID:Casidi,项目名称:GARbro,代码行数:6,代码来源:ArcEncrypted.cs

示例15: GetArchive

        /// <summary>
        /// Get an archive of a given repository's contents, using a specific format and reference
        /// </summary>
        /// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
        /// <param name="reference">A valid Git reference.</param>
        /// <returns>The binary contents of the archive</returns>
        public async Task<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            var endpoint = ApiUrls.RepositoryArchiveLink(owner, name, archiveFormat, reference);

            var response = await Connection.Get<byte[]>(endpoint, TimeSpan.FromMinutes(60));

            return response.Body;
        }
开发者ID:naveensrinivasan,项目名称:octokit.net,代码行数:20,代码来源:RepositoryContentsClient.cs


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