December 18, 2020

learnforge View Your Models - VB.NET

I wrote about migrating our C# .NET samples to VB.NETlearnforge Modify Your Models - VB.NET

You can do the same with any of our .NET projects, including View your models

Once you converted the project you'll have to do the same fixes as in the previous project:
1) Replace all "dynamic" words in the whole project with "Object"
Replace all "dynamic" with "Object"

2) Add "Imports System.Text" in one of the files
Add Imports System.Text

There was only one more thing that needed fixing. When trying to access objects from the responses for GetBucketsAsync() and GetObjectsAsync() then we cannot do it directly through a property, but have to pass the property name to the Dictionary(): e.g. instead of buckets.items we have to use buckets.Dictionary("items")
Change property access

And of course, just like in case of the original sample, you have to add your Forge App's credentials to the project:
Add credentials in project settings

Here is the finished project: https://github.com/adamenagy/Container/blob/master/learn.forge.viewmodels-VB.NET.zip  

Related Posts