Esempio n. 1
0
        /// <inheritdoc/>
        public OpenedFile CreateUntitledOpenedFile(string defaultName, byte[] content)
        {
            if (defaultName == null)
            {
                throw new ArgumentNullException("defaultName");
            }

            OpenedFile file = new FileServiceOpenedFile(this, content);

            file.FileName = new FileName(file.GetHashCode() + "/" + defaultName);
            openedFileDict[file.FileName] = file;
            return(file);
        }
Esempio n. 2
0
        /// <inheritdoc/>
        public OpenedFile GetOrCreateOpenedFile(FileName fileName)
        {
            if (fileName == null)
            {
                throw new ArgumentNullException("fileName");
            }

            OpenedFile file;

            if (!openedFileDict.TryGetValue(fileName, out file))
            {
                openedFileDict[fileName] = file = new FileServiceOpenedFile(this, fileName);
            }
            return(file);
        }
Esempio n. 3
0
		/// <inheritdoc/>
		public OpenedFile CreateUntitledOpenedFile(string defaultName, byte[] content)
		{
			if (defaultName == null)
				throw new ArgumentNullException("defaultName");
			
			OpenedFile file = new FileServiceOpenedFile(this, content);
			file.FileName = new FileName(file.GetHashCode() + "/" + defaultName);
			openedFileDict[file.FileName] = file;
			return file;
		}
Esempio n. 4
0
		/// <inheritdoc/>
		public OpenedFile GetOrCreateOpenedFile(FileName fileName)
		{
			if (fileName == null)
				throw new ArgumentNullException("fileName");
			
			OpenedFile file;
			if (!openedFileDict.TryGetValue(fileName, out file)) {
				openedFileDict[fileName] = file = new FileServiceOpenedFile(this, fileName);
			}
			return file;
		}