コード例 #1
0
        async Task IDocument.SaveAsync(string path, DocumentSaveOperation operation)
        {
            var ok = await SaveAsync(
                NSUrl.FromFilename(path),
                operation == DocumentSaveOperation.ForCreating?
                UIDocumentSaveOperation.ForCreating :
                UIDocumentSaveOperation.ForOverwriting);

            if (!ok)
            {
                throw new Exception("UIDocument.SaveAsync failed");
            }
        }
コード例 #2
0
 public async Task SaveAsync(string path, DocumentSaveOperation operation)
 {
     this.path = path;
     System.IO.File.WriteAllText(path, TextData);
 }
コード例 #3
0
ファイル: TextDocument.cs プロジェクト: praeclarum/Praeclarum
		async Task IDocument.SaveAsync (string path, DocumentSaveOperation operation)
		{
			var ok = await SaveAsync (
				NSUrl.FromFilename (path), 
				operation == DocumentSaveOperation.ForCreating ?
				UIDocumentSaveOperation.ForCreating :
				UIDocumentSaveOperation.ForOverwriting);
			if (!ok)
				throw new Exception ("UIDocument.SaveAsync failed");
		}
コード例 #4
0
ファイル: TextDocument.cs プロジェクト: praeclarum/Praeclarum
		public async Task SaveAsync (string path, DocumentSaveOperation operation)
		{
			this.path = path;
			System.IO.File.WriteAllText (path, TextData);
		}