VSS record representing a project file.
상속: VssRecord
예제 #1
0
        private static VssRecord CreateRecord(
            RecordHeader recordHeader, BufferReader recordReader)
        {
            VssRecord record = null;

            switch (recordHeader.Signature)
            {
            case RevisionRecord.SIGNATURE:
                record = CreateRevisionRecord(recordHeader, recordReader);
                break;

            case CommentRecord.SIGNATURE:
                record = new CommentRecord();
                break;

            case CheckoutRecord.SIGNATURE:
                record = new CheckoutRecord();
                break;

            case ProjectRecord.SIGNATURE:
                record = new ProjectRecord();
                break;

            case BranchRecord.SIGNATURE:
                record = new BranchRecord();
                break;

            case DeltaRecord.SIGNATURE:
                record = new DeltaRecord();
                break;
            }
            return(record);
        }
예제 #2
0
        public ICollection <string> GetProjects()
        {
            var result = new LinkedList <string>();

            if (Header is FileHeaderRecord fileHeader)
            {
                var record = new ProjectRecord();
                var offset = fileHeader.ProjectOffset;
                while (offset > 0)
                {
                    ReadRecord(record, offset);
                    if (!string.IsNullOrEmpty(record.ProjectFile))
                    {
                        result.AddFirst(record.ProjectFile);
                    }
                    offset = record.PrevProjectOffset;
                }
            }
            return(result);
        }
예제 #3
0
 private static VssRecord CreateRecord(
     RecordHeader recordHeader, BufferReader recordReader)
 {
     VssRecord record = null;
     switch (recordHeader.Signature)
     {
         case RevisionRecord.SIGNATURE:
             record = CreateRevisionRecord(recordHeader, recordReader);
             break;
         case CommentRecord.SIGNATURE:
             record = new CommentRecord();
             break;
         case CheckoutRecord.SIGNATURE:
             record = new CheckoutRecord();
             break;
         case ProjectRecord.SIGNATURE:
             record = new ProjectRecord();
             break;
         case BranchRecord.SIGNATURE:
             record = new BranchRecord();
             break;
         case DeltaRecord.SIGNATURE:
             record = new DeltaRecord();
             break;
     }
     return record;
 }
예제 #4
0
 public ICollection<string> GetProjects()
 {
     var result = new LinkedList<string>();
     var fileHeader = header as FileHeaderRecord;
     if (fileHeader != null)
     {
         var record = new ProjectRecord();
         var offset = fileHeader.ProjectOffset;
         while (offset > 0)
         {
             ReadRecord(record, offset);
             if (!string.IsNullOrEmpty(record.ProjectFile))
             {
                 result.AddFirst(record.ProjectFile);
             }
             offset = record.PrevProjectOffset;
         }
     }
     return result;
 }