示例#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);
        }
示例#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);
        }
示例#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;
		}
示例#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;
		}