public virtual void cleanup()
        {
            robot = null;

            // Remove the file system and the manager
            robotFileSystemManager.cleanup();
            robotFileSystemManager = null;
        }
Esempio n. 2
0
        public void StreamBig()
        {
            string tempDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
            Directory.CreateDirectory(tempDir);
            var m = new RobotFileSystemManager(null, 100, tempDir, tempDir);

            using (Stream dataFile = m.getDataFile("test.txt"))
            {
                dataFile.WriteByte(0xFF);
                dataFile.Position = 98;
                dataFile.WriteByte(0xFF);
                dataFile.WriteByte(0xFF);
                dataFile.WriteByte(0xFF);
            }
        }
        protected HostingRobotProxy(IRobotRepositoryItem robotSpecification, IHostManager hostManager, IRobotPeer peer,
                                    RobotStatics statics)
        {
            this.peer = peer;
            this.statics = statics;
            this.hostManager = hostManager;
            this.robotSpecification = robotSpecification;
            outputSb = new StringBuilder(5000);
            output = TextWriter.Synchronized(new StringWriter(outputSb));
            LoggerN.robotOut = output;

            robotFileSystemManager = new RobotFileSystemManager(this, (int) hostManager.getRobotFilesystemQuota(),
                                                                robotSpecification.getWritableDirectory(),
                                                                robotSpecification.getReadableDirectory());
        }
 public QuotaStream(RobotFileSystemManager manager, String path, FileMode mode, FileAccess access,
                    FileShare share)
     : base(path, mode, access, share)
 {
     this.manager = manager;
 }
Esempio n. 5
0
 public QuotaStream(RobotFileSystemManager manager, String path, FileMode mode, FileAccess access,
                    FileShare share)
     : base(path, mode, access, share)
 {
     this.manager = manager;
 }