예제 #1
0
        public override int GetHashCode()
        {
#if (NET462 || NET471)
            return(PartId.GetHashCode() ^ (UserId?.GetHashCode() ?? 0));
#else
            return(HashCode.Combine(PartId, UserId));
#endif
        }
예제 #2
0
        public void CodeBlocks(PartId owner, Receiver <ApiCodeBlock> dst)
        {
            var files = PartFiles(owner).View;
            var count = files.Length;

            for (var i = 0; i < count; i++)
            {
                ref readonly var file = ref skip(files, i);
예제 #3
0
        public override int GetHashCode()
        {
            var hashCode = 1296822809;

            hashCode = hashCode * -1521134295 + EmailTemplateId.GetHashCode();
            hashCode = hashCode * -1521134295 + PartId.GetHashCode();
            return(hashCode);
        }
예제 #4
0
        public override int GetHashCode()
        {
            var hashCode = 1230688051;

            hashCode = hashCode * -1521134295 + EmailId.GetHashCode();
            hashCode = hashCode * -1521134295 + PartId.GetHashCode();
            return(hashCode);
        }
예제 #5
0
 /// <summary>
 /// Enumerates the content of archived files owned by a specified part
 /// </summary>
 public IEnumerable <ApiCodeBlock> PartBlocks(PartId part)
 {
     foreach (var file in PartFiles(part))
     {
         foreach (var item in Read(file))
         {
             if (item.IsNonEmpty)
             {
                 yield return(item);
             }
         }
     }
 }
        override public string ToString()
        {
            string result = PartId.ToString() + TokenSeparator + Position.ToString() + TokenSeparator
                            + Length.ToString() + TokenSeparator + IsCompleted.ToString() + TokenSeparator;

            if (PartETag != null)
            {
                result += PartETag.PartNumber.ToString() + TokenSeparator + PartETag.ETag;
            }
            else
            {
                result += TokenSeparator;
            }

            return(result);
        }
예제 #7
0
 /// <summary>
 /// Enumerates the archived files owned by a specified part
 /// </summary>
 public FS.Files PartFiles(PartId owner)
 => Root.Files(owner, Ext, true);
예제 #8
0
파일: ApiPackArchive.cs 프로젝트: 0xCM/z0
 public FS.FolderPath AsmSourceDir(PartId part)
 => AsmSourceRoot() + FS.folder(part);
예제 #9
0
파일: ApiPackArchive.cs 프로젝트: 0xCM/z0
 public FS.FolderPath PartDir(PartId part)
 => Root + FS.folder(part);