internal LimitedDocument(DocumentReference documentReference, bool isReadOnly, Encoding encoding, string contents, EditingService editingService) : base(documentReference, isReadOnly) { this.encoding = encoding; this.contents = contents; this.editingService = editingService; }
public IEditingService GetViewingService(string rootStoragePath, IStorageProvider customStorageProvider, string workingDirectoryPath, IStorageProvider customWorkingStorageProvider) { IFileStorage adapter = new FileStorageAdapter(customStorageProvider); IFileStorage tempStorageAdapter = new FileStorageAdapter(customWorkingStorageProvider); IEditingService viewingService = new EditingService(rootStoragePath, adapter, workingDirectoryPath, tempStorageAdapter); return(viewingService); }
internal LimitedDocumentView(IDocument document, EditingService editingService) : base(document) { LimitedDocument limitedDocument = (LimitedDocument)document; this.codeEditor = editingService.CreateCodeEditor(limitedDocument.TextBuffer); foreach (DictionaryEntry dictionaryEntry in this.codeEditor.GetEditCommands()) { this.AddCommand((string)dictionaryEntry.Key, (ICommand)dictionaryEntry.Value); } foreach (DictionaryEntry dictionaryEntry in this.codeEditor.GetUndoCommands()) { this.AddCommand((string)dictionaryEntry.Key, (ICommand)dictionaryEntry.Value); } }
private IEditingService GetViewingServiceForOptions(IStorageProvider customStorageProvider, IStorageProvider customTempStorageProvider, SupportedStorageProvider storageProvider, Hashtable options, string rootStoragePath, string workingFolder) { IEditingService viewingService; if (customStorageProvider == null) { switch (storageProvider) { case SupportedStorageProvider.Local: viewingService = new EditingService(rootStoragePath, workingFolder); break; default: object sourceBucketNameObject = null, cacheBucketNameObject = null; string sourceBucketName = null, cacheBucketName = null; if (options != null) { sourceBucketNameObject = options[CommonConstants.BucketNameKey]; if (sourceBucketNameObject != null) { sourceBucketName = (string)sourceBucketNameObject; } cacheBucketNameObject = options[CommonConstants.CacheBucketNameKey]; if (cacheBucketNameObject != null) { cacheBucketName = (string)cacheBucketNameObject; options[CommonConstants.DownloadFolderForCacheStorageKey] = Path.Combine(_downloadPath, cacheBucketName); } options[CommonConstants.CacheFolderKey] = Path.Combine(_downloadPath, sourceBucketName); } viewingService = new EditingService(rootStoragePath, (byte)storageProvider, options, cacheBucketName); break; } } else { viewingService = GetViewingService(rootStoragePath, customStorageProvider, workingFolder, customTempStorageProvider); } return(viewingService); }
public LimitedDocumentType(EditingService editingService) { this.editingService = editingService; }
public XmlDocumentType(EditingService editingService) : base(editingService) { }
public LimitedXamlDocumentType(EditingService editingService) : base(editingService) { }
public HTMLDocumentType(EditingService editingService) : base(editingService) { }
public CodeOptionsPage(EditingService editingService) { this.editingService = editingService; }