public NetworkContext(NewFileModule module, NetworkModel model, MainStoragePath mainPath) { _fileModule = module; _mainPath = mainPath; _netModel = model; _mainFileIndex = new MainFileIndex(this); _changeWatcher = new ChangeWatcher(this); _dispatcher = new ChangeMaster(this); }
public TableOverseer(NetworkModel network) { this.network = network; subfolderShortcuts = new Dictionary<string, FileTable>(); tableList = new Dictionary<GroupModel, FileTable>(); foreach (GroupModel group in network.GroupList) { FileTable table = new FileTable(network.MainPath); tableList.Add(group, table); foreach (string folder in group.folderList) { subfolderShortcuts.Add(folder, table); } } }
public NewFileModule(NetworkModel network) { network = new NetworkModel(@"C:\Test2"); network.GroupList.Add(new GroupModel(new[] {"Fol1", "Fol2"})); _context = new NetworkContext(this, network, network.MainPath); // tableOverseer = new TableOverseer(Network); LoginEnded(); // logowanie arbitra: // tworzy liste plikow // czeka na innych // hash all files // send list to arbiter // arbiter: merge lists: Arbiter + User // send changes to all ( User - Arbiter) // send to user (Arbiter - User) }