-
I'm trying to use However, I have the following code. This makes calls to the Google Drive API, but the details of that aren't relevant... public TryAsync<DriveFile> GetParentFolder(string folderId) =>
TryAsync(() => GetParentFolderDo(folderId));
private async Task<DriveFile> GetParentFolderDo(string folderId) {
FilesResource.GetRequest request = _service.Files.Get(folderId);
request.Fields = "id, name, parents";
DriveFile folder = await request.ExecuteAsync();
request = _service.Files.Get(folder.Parents[0]);
return await request.ExecuteAsync();
} This is fine when the I was expecting the NRE to be caught and handled by What am I doing wrong? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Don't mind me, I'm just a bystander on this project, but I don't think the issues you are having has anything to do with language-ext. |
Beta Was this translation helpful? Give feedback.
-
@Protiguous Thanks for the reply. Why don't you think this is to do with LanguageExt? As I understand it, the whole point of Please clarify if I misunderstood. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
@Protiguous Duh, just realised that the code I posted isn't even using the I've updated the question, and now you can see that all the action happens inside the call to Sorry about the confusion, does the correct code clarify? Thanks again. |
Beta Was this translation helpful? Give feedback.
-
@Protiguous Duh part II. Now I tried again with my updated code, it works fine! I think I need more sleep! Thanks for the replies. |
Beta Was this translation helpful? Give feedback.
-
@Protiguous Thanks - with this track record I'm going to need it! |
Beta Was this translation helpful? Give feedback.
@Protiguous Duh part II.
Now I tried again with my updated code, it works fine!
I think I need more sleep! Thanks for the replies.