{"id":500,"date":"2020-01-31T15:33:41","date_gmt":"2020-01-31T06:33:41","guid":{"rendered":"https:\/\/beiyan-tool.info\/?p=500"},"modified":"2020-01-31T16:13:02","modified_gmt":"2020-01-31T07:13:02","slug":"500","status":"publish","type":"post","link":"https:\/\/beiyan-tool.info\/?p=500","title":{"rendered":"Drobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\uff09"},"content":{"rendered":"<p><a href=\"https:\/\/www.dropbox.com\/developers\/documentation\/dotnet#tutorial\" target=\"_blank\" rel=\"noopener noreferrer\">Dropbox for .NET Developers\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u30b3\u30fc\u30c9\u306fC#\u306a\u306e\u3067\u3001<br \/>\nVB.net\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u300c<a href=\"https:\/\/beiyan-tool.info\/?p=491\" target=\"_blank\" rel=\"noopener noreferrer\">Drobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u6e96\u5099\uff09<\/a>\u300d\u306b\u66f8\u3044\u3066\u3042\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u300cDropboxSDKTest\u300d\u3092\u4f5c\u6210\u3057\u3001\u30d5\u30a9\u30fc\u30e0\u306b\u4ee5\u4e0b\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3082\u53d6\u5f97\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"yellowbox\">\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u53d6\u5f97Button<br \/>\n\u30d5\u30a9\u30eb\u30c0\u5185\u4e00\u89a7\u8868\u793aButton<br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9Button<br \/>\n\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9Button<br \/>\nRichTextBox1<\/div>\n<p>\u5404\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306b\u300cRichTextBox1\u300d\u306b\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/beiyan-tool.info\/wp-content\/uploads\/2020\/01\/dropbox-sdk-tutorial1.jpg\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-502\" src=\"https:\/\/beiyan-tool.info\/wp-content\/uploads\/2020\/01\/dropbox-sdk-tutorial1-300x188.jpg\" alt=\"Drobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\uff09\" width=\"300\" height=\"188\" srcset=\"https:\/\/beiyan-tool.info\/wp-content\/uploads\/2020\/01\/dropbox-sdk-tutorial1-300x188.jpg 300w, https:\/\/beiyan-tool.info\/wp-content\/uploads\/2020\/01\/dropbox-sdk-tutorial1.jpg 569w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u30d5\u30a9\u30fc\u30e0\u306e\u30b3\u30fc\u30c9\u306e\u4e00\u756a\u4e0a\u306b\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"yellowbox\">Imports System.IO<br \/>\nImports System.Text<br \/>\nImports Dropbox.Api<br \/>\nImports Dropbox.Api.Files<\/div>\n<p>\u4ee5\u4e0b\u3001\u30dc\u30bf\u30f3\u306e\u51e6\u7406\u3092\uff11\u3064\u3065\u3064\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u300c\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u53d6\u5f97Button\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true \">    Private Async Sub \u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u53d6\u5f97Button_Click(sender As Object, e As EventArgs) Handles \u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u53d6\u5f97Button.Click\r\n\r\n        Dim strAccessTalken As String = \"[\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3]\"\r\n        Dim dbx = New DropboxClient(strAccessTalken)\r\n        Dim full = Await Task.Run(Function() dbx.Users.GetCurrentAccountAsync())\r\n        RichTextBox1.Text = String.Format(\"{0} - {1}\", full.Name.DisplayName, full.Email)\r\n\r\n    End Sub<\/pre>\n<p>\u975e\u540c\u671f\u3067\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u300cPrivate Async Sub\u300d\u3068\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nRichTextBox1\u306b\u540d\u524d\u3068\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u975e\u540c\u671f\u306e\u51e6\u7406\u306e\u66f8\u304d\u65b9\u3092\u7406\u89e3\u3057\u305f\u3044\u5834\u5408\u3001\u300c<a href=\"http:\/\/kopsystem.azurewebsites.net\/paapi\/linkwtag.aspx?p=beiyan&amp;atag=senzai-ishiki-net-22&amp;asin=B07H1RH33K\" target=\"_blank\" rel=\"noopener noreferrer\">C#\u3067\u975e\u540c\u671f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u3059\u308b\u65b9\u6cd5: Thread\uff0cThreadPool\u304b\u3089Task\uff0casync await\u307e\u3067\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac<\/a>\u300d\u3068\u3044\u3046Kindle\u672c\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<br \/>\nKindle Unlimited\u3067\u7121\u6599\u3067\u3059\u3002<br \/>\nC#\u3067\u3059\u304c\u3001\u3088\u304f\u8aad\u3081\u3070\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u300c\u30d5\u30a9\u30eb\u30c0\u5185\u4e00\u89a7\u8868\u793aButton\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true \">    Private Async Sub \u30d5\u30a9\u30eb\u30c0\u5185\u4e00\u89a7\u8868\u793aButton_Click(sender As Object, e As EventArgs) Handles \u30d5\u30a9\u30eb\u30c0\u5185\u4e00\u89a7\u8868\u793aButton.Click\r\n\r\n        RichTextBox1.Text = \"\"\r\n        Dim strAccessTalken As String = \"[\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3]\"\r\n        Dim dbx = New DropboxClient(strAccessTalken)\r\n        Dim list = Await Task.Run(Function() dbx.Files.ListFolderAsync(\"\"))\r\n        For Each item In list.Entries.Where(Function(i) i.IsFolder)\r\n            RichTextBox1.Text &amp;= String.Format(\"D {0}\" &amp; vbCrLf, item.Name)\r\n        Next\r\n        For Each item In list.Entries.Where(Function(i) i.IsFile)\r\n            RichTextBox1.Text &amp;= String.Format(\"F{0,8} {1}\" &amp; vbCrLf, item.AsFile.Size, item.Name)\r\n        Next\r\n\r\n    End Sub<\/pre>\n<p>\u4f8b\u3048\u3070\u3001\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u3042\u308b\u300cA\u300d\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u8eab\u3092\u898b\u305f\u3044\u5834\u5408\u306f\u3001<\/p>\n<div class=\"redbox\">ListFolderAsync(&#8220;&#8221;)\u2192ListFolderAsync(&#8220;\/A\/&#8221;)<\/div>\n<p>\u3068\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001\u3053\u306eListFolderAsync\u306b\u306f\u554f\u984c\u304c\u3042\u308a\u3001\u78ba\u5b9f\u306b\u30d5\u30a9\u30eb\u30c0\u306e\u5185\u5bb9\u5168\u3066\u304c\u53d6\u5f97\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<h2>\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h2>\n<p>\u300c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9Button\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true \">    Private Async Sub \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9Button_Click(sender As Object, e As EventArgs) Handles \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9Button.Click\r\n\r\n        RichTextBox1.Text = \"\"\r\n        Dim strAccessTalken As String = \"[\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3]\"\r\n        Dim folder As String = \"\/A\"\r\n        Dim file As String = \"a.txt\"\r\n\r\n        Dim dbx = New DropboxClient(strAccessTalken)\r\n        Dim response = Await Task.Run(Function() dbx.Files.DownloadAsync(folder + \"\/\" + file))\r\n        RichTextBox1.Text = Await response.GetContentAsStringAsync()\r\n\r\n    End Sub<\/pre>\n<p>\u30c9\u30ed\u30c3\u30d7\u30dc\u30c3\u30af\u30b9\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u3042\u308b\u300cA\u300d\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306e\u300ca.txt\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u300cRichTextBox1\u300d\u306b\u306f\u300ca.txt\u300d\u306e\u4e2d\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u6587\u5b57\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u300ca.txt\u300d\u305d\u306e\u3082\u306e\u306f\u3001\u3069\u3053\u304b\u306b\u4fdd\u5b58\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408\u306fGetContentAsStringAsync\u3067\u53d6\u5f97\u3057\u305f\u5185\u5bb9\u3092\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u4fdd\u5b58\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b<\/h2>\n<p>\u300c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9Button\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true \">    Private Async Sub \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9Button_Click(sender As Object, e As EventArgs) Handles \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9Button.Click\r\n\r\n        Dim strAccessTalken As String = \"[\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3]\"\r\n        Dim content As String = \"Hello\"\r\n        Dim folder As String = \"\/A\"\r\n        Dim file As String = \"a.txt\"\r\n        Dim mem = New MemoryStream(Encoding.UTF8.GetBytes(content))\r\n        Dim dbx = New DropboxClient(strAccessTalken)\r\n        Dim updated = Await Task.Run(Function() dbx.Files.UploadAsync(folder + \"\/\" + file, WriteMode.Overwrite.Instance, body:=mem))\r\n        RichTextBox1.Text &amp;= String.Format(\"Saved {0}\/{1} rev {2}\", folder, file, updated.Rev)\r\n\r\n    End Sub<\/pre>\n<blockquote class=\"wp-embedded-content\" data-secret=\"XZjID7TbhS\"><p><a href=\"https:\/\/beiyan-tool.info\/?p=508\">VB.net\u3000Drobox SDK\u3092\u4f7f\u3063\u3066\u753b\u50cf\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30b3\u30fc\u30c9<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" title=\"&#8220;VB.net\u3000Drobox SDK\u3092\u4f7f\u3063\u3066\u753b\u50cf\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30b3\u30fc\u30c9&#8221; &#8212; \u30d1\u30bd\u30b3\u30f3\u304c\u597d\u304d\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/beiyan-tool.info\/?p=508&#038;embed=true#?secret=XZjID7TbhS\" data-secret=\"XZjID7TbhS\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"GI86WOwmfr\"><p><a href=\"https:\/\/beiyan-tool.info\/?p=491\">Drobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u6e96\u5099\uff09<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" title=\"&#8220;Drobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u6e96\u5099\uff09&#8221; &#8212; \u30d1\u30bd\u30b3\u30f3\u304c\u597d\u304d\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/beiyan-tool.info\/?p=491&#038;embed=true#?secret=GI86WOwmfr\" data-secret=\"GI86WOwmfr\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dropbox for .NET Developers\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u66f8\u3044\u3066\u3042\u308b\u30b3\u30fc\u30c9\u306fC#\u306a\u306e\u3067\u3001 VB.net\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002 \u307e\u305a\u306f\u3001\u300cDrobox SDK\u3092VB.net\u3067\u4f7f\u3046\u65b9\u6cd5\uff08\u6e96\u5099\uff09\u300d &#8230; <\/p>\n","protected":false},"author":1,"featured_media":502,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=500"}],"version-history":[{"count":5,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":511,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/500\/revisions\/511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/media\/502"}],"wp:attachment":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}