/// <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); }
/// <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); }
/// <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; }
/// <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; }