Exemplo n.º 1
0
 public void DeleteFolder(string path)
 {
     AssertThat.IsTrue(IsFolderExist(path));
     Directory.Delete(path, true); //第二个参数:删除子目录
 }
Exemplo n.º 2
0
 public void Unregist <T>(T t) where T : ITick, new()
 {
     AssertThat.IsTrue(_ticks.Contains(t), "Tick list do not have this componentBase");
     _ticks.Remove(t);
 }
Exemplo n.º 3
0
 public void DeleteFile(string path)
 {
     AssertThat.IsTrue(IsFileExist(path));
     File.Delete(path);
 }
Exemplo n.º 4
0
 public void MoveWritePostionTo(int index)
 {
     AssertThat.IsTrue(index <= Size);
     WritePosition = index;
 }
Exemplo n.º 5
0
 public object GetObject(string name)
 {
     AssertThat.IsTrue(_objs.ContainsKey(name), "Do not have this key");
     return(_objs[name]);
 }
Exemplo n.º 6
0
 public void MoveReadPositionTo(int index)
 {
     AssertThat.IsTrue(index <= Size);
     ReadPosition = index;
 }
Exemplo n.º 7
0
 public void MoveWritePosition(int length)
 {
     AssertThat.IsTrue(WritePosition + length <= Size);
     WritePosition += length;
 }
Exemplo n.º 8
0
 public void MoveReadPostion(int length)
 {
     AssertThat.IsTrue(ReadPosition + length <= Size);
     ReadPosition += length;
 }
 public void RemoveTask(ITick task)
 {
     AssertThat.IsTrue(_asyncTasks.Contains(task), "task not exist");
     _asyncTasks.Remove(task);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Remove key and all its actions
 /// </summary>
 /// <param name="key"></param>
 public void RemoveListener(string key)
 {
     AssertThat.IsTrue(container.ContainsKey(key));
     container[key].Clear();
     container.Remove(key);
 }