public Disk(DiskIndex index, DiskType type, string name) : this() { this.Index = index; this.Type = type; this.Name = name; }
internal Disk(DiskInformation info) { this.Type = info.type; this.State = info.state; this.ContentType = info.content_type; this.Index = DiskIndex.Parse(info.index); this.Available = info.available; this.Name = info.name; if (info.files != null) { this.FileTree = new FileTree(this, info); } if (info.content != null) { this.Content = new DiskContent(this, info); } }
public void AddDisk(DiskType type, DiskContentType contentType, char letter, string name, string path) { var number = (byte)(GetMax(from pair in this.disks let idx = pair.Value.Index where idx.Letter == letter select idx.Number, 0) + 1); var index = new DiskIndex(letter, number); var disk = new Disk(index, type, name) { ContentType = contentType }; if (path != null) { disk.AddFileTree(new DirectoryInfo(path)); disk.State = DiskState.FINALIZED; } this.disks.Add(index.ToString(), disk); return; }
public IDisk this [DiskIndex index] { get { return(this [index.ToString()]); } }