Пример #1
0
        public static void CopyFile(string id, int fileRegister1, string semantics, int fileRegister2, string salt)
        {
            Helper.Semantics semanticsId = getSemanticsId(semantics);
            IClientToPM      client      = (IClientToPM)GetProcess(id);

            client.Copy(fileRegister1, semanticsId, fileRegister2, Helper.StringToBytes(salt));
        }
Пример #2
0
        public static void ReadFile(string id, int fileRegister, string semantics, int byteRegister)
        {
            Helper.Semantics semanticsId = getSemanticsId(semantics);
            IClientToPM      client      = (IClientToPM)GetProcess(id);

            client.Read(fileRegister, semanticsId, byteRegister);
        }
Пример #3
0
        public static void StartClient(string id, int port)
        {
            consoles.Add(Process.Start("Client.exe", id + " " + port));
            IClientToPM client = (IClientToPM)Activator.GetObject(
                typeof(IClientToPM),
                Helper.GetUrl(id, port)
                );

            processes[id] = client;
            SendMetadataLocations(client);
        }
Пример #4
0
        public static void WriteFile(string id, int fileRegister, string contents)
        {
            IClientToPM client = (IClientToPM)GetProcess(id);

            client.Write(fileRegister, Helper.StringToBytes(contents));
        }
Пример #5
0
        public static void WriteFile(string id, int fileRegister, int byteRegister)
        {
            IClientToPM client = (IClientToPM)GetProcess(id);

            client.Write(fileRegister, byteRegister);
        }
Пример #6
0
        public static void CreateFile(string id, string filename, int nbData, int readq, int writeq)
        {
            IClientToPM client = (IClientToPM)GetProcess(id);

            client.Create(filename, nbData, readq, writeq);
        }
Пример #7
0
        public static void OpenFile(string id, string filename)
        {
            IClientToPM client = (IClientToPM)GetProcess(id);

            client.Open(filename);
        }
Пример #8
0
        public static void DeleteFile(string id, string filename)
        {
            IClientToPM client = (IClientToPM)GetProcess(id);

            client.Delete(filename);
        }