예제 #1
0
        public FileNode AddFile(SubDirectory parent, string name, long length)
        {
            FileNode    result     = new FileNode();
            SingleFile  singleFile = SizeMappings.GetComponentByValue <SingleFile>(length);
            FilesBySize filesBySize;

            if (null != singleFile)
            {
                SizeMappings.Remove(singleFile);
                filesBySize = new FilesBySize();
                filesBySize.AddFile(singleFile);
                filesBySize.AddFile(result.Grouped);
            }
            else
            {
                filesBySize = SizeMappings.GetComponentByValue <FilesBySize>(length);
                if (null != filesBySize)
                {
                    filesBySize.AddFile(result.Grouped);
                }
                else
                {
                    SizeMappings.AddValue(result.Grouped, length);
                }
            }
            parent.AddFile(result.StructureNode, name);
            return(result);
        }
예제 #2
0
 internal SingleFileSite(SingleFile component, SizeMappingContainer container, long length) : base(component, container, length)
 {
     if (length < 0L)
     {
         throw new ArgumentOutOfRangeException("length");
     }
 }
예제 #3
0
 public FileNode()
 {
     Grouped       = new SingleFile(this);
     StructureNode = new FileStructureNode(this);
 }
예제 #4
0
 public SingleFileSite(SingleFile component, NestedValueContainer <MD5Checksum> container, MD5Checksum value) : base(component, container, value)
 {
 }
예제 #5
0
 internal void AddFile(SingleFile singleFile)
 {
     throw new NotImplementedException();
 }