Skip to content

Instantly share code, notes, and snippets.

@ianjennings
Created September 16, 2020 13:44
Show Gist options
  • Save ianjennings/ee4d1fb61ac91e8a3b7c6e6f978c8cd7 to your computer and use it in GitHub Desktop.
Save ianjennings/ee4d1fb61ac91e8a3b7c6e6f978c8cd7 to your computer and use it in GitHub Desktop.

Paircast .net Example

Yes. On DH and a on and on and on with whom I share. 00:06

Paircast > Paircast 00:10

Some tea, too. 00:18

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 00:21

Familiarized myself with 00:22

What we need here is needed done A new Web. 00:25

iTerm2 > dotnet new web 00:31

Any project, all right? 00:33

Now, if God are getting a door, we've got a program have all our good stuff into there so we don't need Thio stall our packages. 00:37

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 00:41

And dump right here. 00:51

Sublime Text > contentful.md — telnyx 00:51

iTerm2 > dotnet add package AWSSDK.S3; dotnet add package dotenv.net; dotnet add ; 01:01

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- dotnet-walkthru.csproj
+++ dotnet-walkthru.csproj
@@ -7,6 +7,7 @@
 
   <ItemGroup>
     <PackageReference Include="AWSSDK.S3" Version="3.5.1" />
+    <PackageReference Include="dotenv.net" Version="2.1.1" />
   </ItemGroup>
 
 </Project>

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- obj/dotnet-walkthru.csproj.nuget.dgspec.json
+++ obj/dotnet-walkthru.csproj.nuget.dgspec.json
@@ -38,6 +38,10 @@
           "dependencies": {
             "AWSSDK.S3": {
               "target": "Package",
+              "version": "[3.5.1, )"
+            },
+            "dotenv.net": {
+              "target": "Package",
               "version": "[*, )"
             }
           },

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -22,6 +22,27 @@
         "runtime": {
           "lib/netcoreapp3.1/AWSSDK.S3.dll": {}
         }
+      },
+      "dotenv.net/2.1.1": {
+        "type": "package",
+        "dependencies": {
+          "System.Memory": "4.5.4"
+        },
+        "compile": {
+          "lib/netstandard2.0/dotenv.net.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.0/dotenv.net.dll": {}
+        }
+      },
+      "System.Memory/4.5.4": {
+        "type": "package",
+        "compile": {
+          "ref/netcoreapp2.1/_._": {}
+        },
+        "runtime": {
+          "lib/netcoreapp2.1/_._": {}
+        }
       }
     }
   },

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -83,11 +104,47 @@
         "tools/install.ps1",
         "tools/uninstall.ps1"
       ]
+    },
+    "dotenv.net/2.1.1": {
+      "sha512": "VWP/1PbyjRCLTnfXQNKDtd1yH/zLZKlpuehq2F564XjUXvPeFLJ2YCCY7+2KLkU5bEgumFzirs6Y8gkbRm7w2Q==",
+      "type": "package",
+      "path": "dotenv.net/2.1.1",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "dotenv.net.2.1.1.nupkg.sha512",
+        "dotenv.net.nuspec",
+        "lib/netstandard2.0/dotenv.net.dll"
+      ]
+    },
+    "System.Memory/4.5.4": {
+      "sha512": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
+      "type": "package",
+      "path": "system.memory/4.5.4",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "LICENSE.TXT",
+        "THIRD-PARTY-NOTICES.TXT",
+        "lib/net461/System.Memory.dll",
+        "lib/net461/System.Memory.xml",
+        "lib/netcoreapp2.1/_._",
+        "lib/netstandard1.1/System.Memory.dll",
+        "lib/netstandard1.1/System.Memory.xml",
+        "lib/netstandard2.0/System.Memory.dll",
+        "lib/netstandard2.0/System.Memory.xml",
+        "ref/netcoreapp2.1/_._",
+        "system.memory.4.5.4.nupkg.sha512",
+        "system.memory.nuspec",
+        "useSharedDesignerContext.txt",
+        "version.txt"
+      ]
     }
   },
   "projectFileDependencyGroups": {
     ".NETCoreApp,Version=v3.1": [
-      "AWSSDK.S3 >= *"
+      "AWSSDK.S3 >= 3.5.1",
+      "dotenv.net >= *"
     ]
   },
   "packageFolders": {

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -127,6 +184,10 @@
         "dependencies": {
           "AWSSDK.S3": {
             "target": "Package",
+            "version": "[3.5.1, )"
+          },
+          "dotenv.net": {
+            "target": "Package",
             "version": "[*, )"
           }
         },

01:16

Commit 4543c674b3286a0def9facbe33eccbc0b5fec3e2
--- obj/project.nuget.cache
+++ obj/project.nuget.cache
@@ -1,11 +1,13 @@
 {
   "version": 2,
-  "dgSpecHash": "kqLpLCjrOLVlw4hgZEzlamdm8BGvGpmBnHquJhdXN7AviEOKgr6YAAhLYYgZ6nrSLlWgz8tB6tMlpDLIH3IzSg==",
+  "dgSpecHash": "/uFpBL1vR7IKJ9dw32Ky1JvIwY4eVMRiZGmiXbzo3sy1HIYkdAHCimq8GyE+y4P0horxIv3lkbRepAjrkGkn9g==",
   "success": true,
   "projectFilePath": "/Users/localadmin/code/dotnet-walkthru/dotnet-walkthru.csproj",
   "expectedPackageFiles": [
     "/Users/localadmin/.nuget/packages/awssdk.core/3.5.1.9/awssdk.core.3.5.1.9.nupkg.sha512",
-    "/Users/localadmin/.nuget/packages/awssdk.s3/3.5.1/awssdk.s3.3.5.1.nupkg.sha512"
+    "/Users/localadmin/.nuget/packages/awssdk.s3/3.5.1/awssdk.s3.3.5.1.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/dotenv.net/2.1.1/dotenv.net.2.1.1.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/system.memory/4.5.4/system.memory.4.5.4.nupkg.sha512"
   ],
   "logs": []
 } 
\ No newline at end of file

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- dotnet-walkthru.csproj
+++ dotnet-walkthru.csproj
@@ -8,6 +8,7 @@
   <ItemGroup>
     <PackageReference Include="AWSSDK.S3" Version="3.5.1" />
     <PackageReference Include="dotenv.net" Version="2.1.1" />
+    <PackageReference Include="Telnyx.net" Version="2.1.1" />
   </ItemGroup>
 
 </Project>

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -35,6 +35,33 @@
           "lib/netstandard2.0/dotenv.net.dll": {}
         }
       },
+      "Microsoft.CSharp/4.7.0": {
+        "type": "package",
+        "compile": {
+          "ref/netcoreapp2.0/_._": {}
+        },
+        "runtime": {
+          "lib/netcoreapp2.0/_._": {}
+        }
+      },
+      "Newtonsoft.Json/11.0.2": {
+        "type": "package",
+        "compile": {
+          "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+        }
+      },
+      "System.Collections.Immutable/1.7.0": {
+        "type": "package",
+        "compile": {
+          "lib/netstandard2.0/System.Collections.Immutable.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.0/System.Collections.Immutable.dll": {}
+        }
+      },
       "System.Memory/4.5.4": {
         "type": "package",
         "compile": {

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -43,6 +70,20 @@
         "runtime": {
           "lib/netcoreapp2.1/_._": {}
         }
+      },
+      "Telnyx.net/2.1.1": {
+        "type": "package",
+        "dependencies": {
+          "Microsoft.CSharp": "4.7.0",
+          "Newtonsoft.Json": "11.0.2",
+          "System.Collections.Immutable": "1.7.0"
+        },
+        "compile": {
+          "lib/netstandard2.1/Telnyx.net.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.1/Telnyx.net.dll": {}
+        }
       }
     }
   },

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -117,6 +158,128 @@
         "lib/netstandard2.0/dotenv.net.dll"
       ]
     },
+    "Microsoft.CSharp/4.7.0": {
+      "sha512": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
+      "type": "package",
+      "path": "microsoft.csharp/4.7.0",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "LICENSE.TXT",
+        "THIRD-PARTY-NOTICES.TXT",
+        "lib/MonoAndroid10/_._",
+        "lib/MonoTouch10/_._",
+        "lib/net45/_._",
+        "lib/netcore50/Microsoft.CSharp.dll",
+        "lib/netcoreapp2.0/_._",
+        "lib/netstandard1.3/Microsoft.CSharp.dll",
+        "lib/netstandard2.0/Microsoft.CSharp.dll",
+        "lib/netstandard2.0/Microsoft.CSharp.xml",
+        "lib/portable-net45+win8+wp8+wpa81/_._",
+        "lib/uap10.0.16299/_._",
+        "lib/win8/_._",
+        "lib/wp80/_._",
+        "lib/wpa81/_._",
+        "lib/xamarinios10/_._",
+        "lib/xamarinmac20/_._",
+        "lib/xamarintvos10/_._",
+        "lib/xamarinwatchos10/_._",
+        "microsoft.csharp.4.7.0.nupkg.sha512",
+        "microsoft.csharp.nuspec",
+        "ref/MonoAndroid10/_._",
+        "ref/MonoTouch10/_._",
+        "ref/net45/_._",
+        "ref/netcore50/Microsoft.CSharp.dll",
+        "ref/netcore50/Microsoft.CSharp.xml",
+        "ref/netcore50/de/Microsoft.CSharp.xml",
+        "ref/netcore50/es/Microsoft.CSharp.xml",
+        "ref/netcore50/fr/Microsoft.CSharp.xml",
+        "ref/netcore50/it/Microsoft.CSharp.xml",
+        "ref/netcore50/ja/Microsoft.CSharp.xml",
+        "ref/netcore50/ko/Microsoft.CSharp.xml",
+        "ref/netcore50/ru/Microsoft.CSharp.xml",
+        "ref/netcore50/zh-hans/Microsoft.CSharp.xml",
+        "ref/netcore50/zh-hant/Microsoft.CSharp.xml",
+        "ref/netcoreapp2.0/_._",
+        "ref/netstandard1.0/Microsoft.CSharp.dll",
+        "ref/netstandard1.0/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/de/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/es/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/fr/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/it/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/ja/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/ko/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/ru/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/zh-hans/Microsoft.CSharp.xml",
+        "ref/netstandard1.0/zh-hant/Microsoft.CSharp.xml",
+        "ref/netstandard2.0/Microsoft.CSharp.dll",
+        "ref/netstandard2.0/Microsoft.CSharp.xml",
+        "ref/portable-net45+win8+wp8+wpa81/_._",
+        "ref/uap10.0.16299/_._",
+        "ref/win8/_._",
+        "ref/wp80/_._",
+        "ref/wpa81/_._",
+        "ref/xamarinios10/_._",
+        "ref/xamarinmac20/_._",
+        "ref/xamarintvos10/_._",
+        "ref/xamarinwatchos10/_._",
+        "useSharedDesignerContext.txt",
+        "version.txt"
+      ]
+    },
+    "Newtonsoft.Json/11.0.2": {
+      "sha512": "IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==",
+      "type": "package",
+      "path": "newtonsoft.json/11.0.2",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "LICENSE.md",
+        "lib/net20/Newtonsoft.Json.dll",
+        "lib/net20/Newtonsoft.Json.xml",
+        "lib/net35/Newtonsoft.Json.dll",
+        "lib/net35/Newtonsoft.Json.xml",
+        "lib/net40/Newtonsoft.Json.dll",
+        "lib/net40/Newtonsoft.Json.xml",
+        "lib/net45/Newtonsoft.Json.dll",
+        "lib/net45/Newtonsoft.Json.xml",
+        "lib/netstandard1.0/Newtonsoft.Json.dll",
+        "lib/netstandard1.0/Newtonsoft.Json.xml",
+        "lib/netstandard1.3/Newtonsoft.Json.dll",
+        "lib/netstandard1.3/Newtonsoft.Json.xml",
+        "lib/netstandard2.0/Newtonsoft.Json.dll",
+        "lib/netstandard2.0/Newtonsoft.Json.xml",
+        "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll",
+        "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml",
+        "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll",
+        "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml",
+        "newtonsoft.json.11.0.2.nupkg.sha512",
+        "newtonsoft.json.nuspec"
+      ]
+    },
+    "System.Collections.Immutable/1.7.0": {
+      "sha512": "RVSM6wZUo6L2y6P3vN6gjUtyJ2IF2RVtrepF3J7nrDKfFQd5u/SnSUFclchYQis8/k5scHy9E+fVeKVQLnnkzw==",
+      "type": "package",
+      "path": "system.collections.immutable/1.7.0",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "LICENSE.TXT",
+        "THIRD-PARTY-NOTICES.TXT",
+        "lib/netstandard1.0/System.Collections.Immutable.dll",
+        "lib/netstandard1.0/System.Collections.Immutable.xml",
+        "lib/netstandard1.3/System.Collections.Immutable.dll",
+        "lib/netstandard1.3/System.Collections.Immutable.xml",
+        "lib/netstandard2.0/System.Collections.Immutable.dll",
+        "lib/netstandard2.0/System.Collections.Immutable.xml",
+        "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll",
+        "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.xml",
+        "system.collections.immutable.1.7.0.nupkg.sha512",
+        "system.collections.immutable.nuspec",
+        "useSharedDesignerContext.txt",
+        "version.txt"
+      ]
+    },
     "System.Memory/4.5.4": {
       "sha512": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
       "type": "package",

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -139,12 +302,36 @@
         "useSharedDesignerContext.txt",
         "version.txt"
       ]
+    },
+    "Telnyx.net/2.1.1": {
+      "sha512": "ouXXZ8KOgAuHMrhb3DNefh+m5VkqdVkeLdqnwkPEk1cxYPvCNGcj6HPjFNkQoz4dan8ZbpEm6ECIJxMKNoZ4GA==",
+      "type": "package",
+      "path": "telnyx.net/2.1.1",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "lib/net45/Telnyx.net.dll",
+        "lib/net45/Telnyx.net.pdb",
+        "lib/net45/Telnyx.net.xml",
+        "lib/net452/Telnyx.net.dll",
+        "lib/net452/Telnyx.net.pdb",
+        "lib/net452/Telnyx.net.xml",
+        "lib/netstandard2.0/Telnyx.net.dll",
+        "lib/netstandard2.0/Telnyx.net.pdb",
+        "lib/netstandard2.0/Telnyx.net.xml",
+        "lib/netstandard2.1/Telnyx.net.dll",
+        "lib/netstandard2.1/Telnyx.net.pdb",
+        "lib/netstandard2.1/Telnyx.net.xml",
+        "telnyx.net.2.1.1.nupkg.sha512",
+        "telnyx.net.nuspec"
+      ]
     }
   },
   "projectFileDependencyGroups": {
     ".NETCoreApp,Version=v3.1": [
       "AWSSDK.S3 >= 3.5.1",
-      "dotenv.net >= *"
+      "Telnyx.net >= *",
+      "dotenv.net >= 2.1.1"
     ]
   },
   "packageFolders": {

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -186,9 +373,13 @@
             "target": "Package",
             "version": "[3.5.1, )"
           },
-          "dotenv.net": {
+          "Telnyx.net": {
             "target": "Package",
             "version": "[*, )"
+          },
+          "dotenv.net": {
+            "target": "Package",
+            "version": "[2.1.1, )"
           }
         },
         "imports": [

01:25

Commit 837519eb147225707dfeba3473973ce7fd927464
--- obj/project.nuget.cache
+++ obj/project.nuget.cache
@@ -1,13 +1,17 @@
 {
   "version": 2,
-  "dgSpecHash": "/uFpBL1vR7IKJ9dw32Ky1JvIwY4eVMRiZGmiXbzo3sy1HIYkdAHCimq8GyE+y4P0horxIv3lkbRepAjrkGkn9g==",
+  "dgSpecHash": "dk4l3DLJoWbQRuYe3C9nI8ohQCILKtepgYDoltZ5ea+XJ+4dBPcEgZ676/5RriCy0SW3Eoll/8H3E1omtlQ/Xg==",
   "success": true,
   "projectFilePath": "/Users/localadmin/code/dotnet-walkthru/dotnet-walkthru.csproj",
   "expectedPackageFiles": [
     "/Users/localadmin/.nuget/packages/awssdk.core/3.5.1.9/awssdk.core.3.5.1.9.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/awssdk.s3/3.5.1/awssdk.s3.3.5.1.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/dotenv.net/2.1.1/dotenv.net.2.1.1.nupkg.sha512",
-    "/Users/localadmin/.nuget/packages/system.memory/4.5.4/system.memory.4.5.4.nupkg.sha512"
+    "/Users/localadmin/.nuget/packages/microsoft.csharp/4.7.0/microsoft.csharp.4.7.0.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/newtonsoft.json/11.0.2/newtonsoft.json.11.0.2.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/system.collections.immutable/1.7.0/system.collections.immutable.1.7.0.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/system.memory/4.5.4/system.memory.4.5.4.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/telnyx.net/2.1.1/telnyx.net.2.1.1.nupkg.sha512"
   ],
   "logs": []
 } 
\ No newline at end of file

And so we do need to go ahead and grab our environment files, So I'm going to just happen over mine are 01:27

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- dotnet-walkthru.csproj
+++ dotnet-walkthru.csproj
@@ -8,6 +8,7 @@
   <ItemGroup>
     <PackageReference Include="AWSSDK.S3" Version="3.5.1" />
     <PackageReference Include="dotenv.net" Version="2.1.1" />
+    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" />
     <PackageReference Include="Telnyx.net" Version="2.1.1" />
   </ItemGroup>
 

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/dotnet-walkthru.csproj.nuget.dgspec.json
+++ obj/dotnet-walkthru.csproj.nuget.dgspec.json
@@ -40,10 +40,14 @@
               "target": "Package",
               "version": "[3.5.1, )"
             },
-            "Telnyx.net": {
+            "Microsoft.AspNetCore.Mvc.NewtonsoftJson": {
               "target": "Package",
               "version": "[*, )"
             },
+            "Telnyx.net": {
+              "target": "Package",
+              "version": "[2.1.1, )"
+            },
             "dotenv.net": {
               "target": "Package",
               "version": "[2.1.1, )"

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -35,6 +35,36 @@
           "lib/netstandard2.0/dotenv.net.dll": {}
         }
       },
+      "Microsoft.AspNetCore.JsonPatch/3.1.8": {
+        "type": "package",
+        "dependencies": {
+          "Microsoft.CSharp": "4.7.0",
+          "Newtonsoft.Json": "12.0.2"
+        },
+        "compile": {
+          "lib/netstandard2.0/Microsoft.AspNetCore.JsonPatch.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.0/Microsoft.AspNetCore.JsonPatch.dll": {}
+        }
+      },
+      "Microsoft.AspNetCore.Mvc.NewtonsoftJson/3.1.8": {
+        "type": "package",
+        "dependencies": {
+          "Microsoft.AspNetCore.JsonPatch": "3.1.8",
+          "Newtonsoft.Json": "12.0.2",
+          "Newtonsoft.Json.Bson": "1.0.2"
+        },
+        "compile": {
+          "lib/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll": {}
+        },
+        "runtime": {
+          "lib/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll": {}
+        },
+        "frameworkReferences": [
+          "Microsoft.AspNetCore.App"
+        ]
+      },
       "Microsoft.CSharp/4.7.0": {
         "type": "package",
         "compile": {

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -44,7 +74,7 @@
           "lib/netcoreapp2.0/_._": {}
         }
       },
-      "Newtonsoft.Json/11.0.2": {
+      "Newtonsoft.Json/12.0.2": {
         "type": "package",
         "compile": {
           "lib/netstandard2.0/Newtonsoft.Json.dll": {}

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -53,6 +83,18 @@
           "lib/netstandard2.0/Newtonsoft.Json.dll": {}
         }
       },
+      "Newtonsoft.Json.Bson/1.0.2": {
+        "type": "package",
+        "dependencies": {
+          "Newtonsoft.Json": "12.0.1"
+        },
+        "compile": {
+          "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {}
+        },
+        "runtime": {
+          "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {}
+        }
+      },
       "System.Collections.Immutable/1.7.0": {
         "type": "package",
         "compile": {

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -158,6 +200,36 @@
         "lib/netstandard2.0/dotenv.net.dll"
       ]
     },
+    "Microsoft.AspNetCore.JsonPatch/3.1.8": {
+      "sha512": "VyY44zszuKBJ/rsbcgIKu1NjRPr2CKdmQrs75yR+YaEiD8WEWnbqoxw5DO8iQBFCKb1z4Xs5Jzc5p0b41PNRmg==",
+      "type": "package",
+      "path": "microsoft.aspnetcore.jsonpatch/3.1.8",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "Icon.png",
+        "THIRD-PARTY-NOTICES.TXT",
+        "lib/netstandard2.0/Microsoft.AspNetCore.JsonPatch.dll",
+        "lib/netstandard2.0/Microsoft.AspNetCore.JsonPatch.xml",
+        "microsoft.aspnetcore.jsonpatch.3.1.8.nupkg.sha512",
+        "microsoft.aspnetcore.jsonpatch.nuspec"
+      ]
+    },
+    "Microsoft.AspNetCore.Mvc.NewtonsoftJson/3.1.8": {
+      "sha512": "xlYBboQAji96pWvrH5sDqOJSOGnB4zEWXrJrqiRBEWxmAWgWziRG0jQcg7S9SDPYLfvsIukDjI20LSyjxBBDCA==",
+      "type": "package",
+      "path": "microsoft.aspnetcore.mvc.newtonsoftjson/3.1.8",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "Icon.png",
+        "THIRD-PARTY-NOTICES.TXT",
+        "lib/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll",
+        "lib/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.xml",
+        "microsoft.aspnetcore.mvc.newtonsoftjson.3.1.8.nupkg.sha512",
+        "microsoft.aspnetcore.mvc.newtonsoftjson.nuspec"
+      ]
+    },
     "Microsoft.CSharp/4.7.0": {
       "sha512": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
       "type": "package",

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -227,10 +299,10 @@
         "version.txt"
       ]
     },
-    "Newtonsoft.Json/11.0.2": {
-      "sha512": "IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==",
+    "Newtonsoft.Json/12.0.2": {
+      "sha512": "rTK0s2EKlfHsQsH6Yx2smvcTCeyoDNgCW7FEYyV01drPlh2T243PR2DiDXqtC5N4GDm4Ma/lkxfW5a/4793vbA==",
       "type": "package",
-      "path": "newtonsoft.json/11.0.2",
+      "path": "newtonsoft.json/12.0.2",
       "files": [
         ".nupkg.metadata",
         ".signature.p7s",

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -253,10 +325,31 @@
         "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml",
         "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll",
         "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml",
-        "newtonsoft.json.11.0.2.nupkg.sha512",
+        "newtonsoft.json.12.0.2.nupkg.sha512",
         "newtonsoft.json.nuspec"
       ]
     },
+    "Newtonsoft.Json.Bson/1.0.2": {
+      "sha512": "QYFyxhaABwmq3p/21VrZNYvCg3DaEoN/wUuw5nmfAf0X3HLjgupwhkEWdgfb9nvGAUIv3osmZoD3kKl4jxEmYQ==",
+      "type": "package",
+      "path": "newtonsoft.json.bson/1.0.2",
+      "files": [
+        ".nupkg.metadata",
+        ".signature.p7s",
+        "LICENSE.md",
+        "lib/net45/Newtonsoft.Json.Bson.dll",
+        "lib/net45/Newtonsoft.Json.Bson.pdb",
+        "lib/net45/Newtonsoft.Json.Bson.xml",
+        "lib/netstandard1.3/Newtonsoft.Json.Bson.dll",
+        "lib/netstandard1.3/Newtonsoft.Json.Bson.pdb",
+        "lib/netstandard1.3/Newtonsoft.Json.Bson.xml",
+        "lib/netstandard2.0/Newtonsoft.Json.Bson.dll",
+        "lib/netstandard2.0/Newtonsoft.Json.Bson.pdb",
+        "lib/netstandard2.0/Newtonsoft.Json.Bson.xml",
+        "newtonsoft.json.bson.1.0.2.nupkg.sha512",
+        "newtonsoft.json.bson.nuspec"
+      ]
+    },
     "System.Collections.Immutable/1.7.0": {
       "sha512": "RVSM6wZUo6L2y6P3vN6gjUtyJ2IF2RVtrepF3J7nrDKfFQd5u/SnSUFclchYQis8/k5scHy9E+fVeKVQLnnkzw==",
       "type": "package",

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -330,7 +423,8 @@
   "projectFileDependencyGroups": {
     ".NETCoreApp,Version=v3.1": [
       "AWSSDK.S3 >= 3.5.1",
-      "Telnyx.net >= *",
+      "Microsoft.AspNetCore.Mvc.NewtonsoftJson >= *",
+      "Telnyx.net >= 2.1.1",
       "dotenv.net >= 2.1.1"
     ]
   },

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -373,10 +467,14 @@
             "target": "Package",
             "version": "[3.5.1, )"
           },
-          "Telnyx.net": {
+          "Microsoft.AspNetCore.Mvc.NewtonsoftJson": {
             "target": "Package",
             "version": "[*, )"
           },
+          "Telnyx.net": {
+            "target": "Package",
+            "version": "[2.1.1, )"
+          },
           "dotenv.net": {
             "target": "Package",
             "version": "[2.1.1, )"

01:34

Commit cf4437afea6327346db5c16ea98599c2b38e4dc3
--- obj/project.nuget.cache
+++ obj/project.nuget.cache
@@ -1,14 +1,17 @@
 {
   "version": 2,
-  "dgSpecHash": "dk4l3DLJoWbQRuYe3C9nI8ohQCILKtepgYDoltZ5ea+XJ+4dBPcEgZ676/5RriCy0SW3Eoll/8H3E1omtlQ/Xg==",
+  "dgSpecHash": "u6aPa5dVoyGYNRJp9bh6FVGJKI3jos+9Bv6W6Sy3EdRGwVZRZ9F8xeyzOaR/O1zMh0oOmHoXfeWep5sPOehcAg==",
   "success": true,
   "projectFilePath": "/Users/localadmin/code/dotnet-walkthru/dotnet-walkthru.csproj",
   "expectedPackageFiles": [
     "/Users/localadmin/.nuget/packages/awssdk.core/3.5.1.9/awssdk.core.3.5.1.9.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/awssdk.s3/3.5.1/awssdk.s3.3.5.1.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/dotenv.net/2.1.1/dotenv.net.2.1.1.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/microsoft.aspnetcore.jsonpatch/3.1.8/microsoft.aspnetcore.jsonpatch.3.1.8.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/microsoft.aspnetcore.mvc.newtonsoftjson/3.1.8/microsoft.aspnetcore.mvc.newtonsoftjson.3.1.8.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/microsoft.csharp/4.7.0/microsoft.csharp.4.7.0.nupkg.sha512",
-    "/Users/localadmin/.nuget/packages/newtonsoft.json/11.0.2/newtonsoft.json.11.0.2.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/newtonsoft.json/12.0.2/newtonsoft.json.12.0.2.nupkg.sha512",
+    "/Users/localadmin/.nuget/packages/newtonsoft.json.bson/1.0.2/newtonsoft.json.bson.1.0.2.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/system.collections.immutable/1.7.0/system.collections.immutable.1.7.0.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/system.memory/4.5.4/system.memory.4.5.4.nupkg.sha512",
     "/Users/localadmin/.nuget/packages/telnyx.net/2.1.1/telnyx.net.2.1.1.nupkg.sha512"

You need to get back up needed to go to the Telmex demo dot net tonics. 01:36

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 01:42

Here. Grab die in Vienna happy that to here and I want to grab a sample. I'm gonna copy that. 01:43

To here as well. 01:53

And I just had a tiny studio. Oh, Ah, uh, see 01:55

Okay, so hopefully it didn't grab that. 02:06

Sweet doesn't like it. All right, everybody inside and the Web. 02:11

Sublime Text > .gitignore — dotnet-walkthru 02:14

Cool. 02:20

Now, See, we got on our screen which got sublime fine. 02:22

You need your head and open up there. 02:28

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 02:35

So we do need to get him out of here Are people say you are 02:38

Sublime Text > 02:45

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 02:55

Please. 03:01

Ah Ah ah! You read our 03:05

Code > Visual Studio Code 03:05

Code > Program.cs — dotnet-walkthru 03:16

I want her released my first AA that ended it. 03:17

I used to get there for and mad. 03:26

Sublime Text > contentful.md — telnyx 03:30

All that jazz locked today. Today, ESU not have arms. 03:34

Sublime Text > Program.cs — telnyx 03:39

You know, any method is going to call the host and grab our work We now have for money Thick launched that everyone wants any 1000 once. Well, just 03:41

Has never been easily where you are. 03:54

As we did before, so I want one of those and are actually eating our controllers. 03:58

Code > Program.cs — dotnet-walkthru 04:00

04:02

Commit 3b504e1e7d2f4e5f60366ae2f70bf67e4189f369
--- .gitignore
+++ .gitignore
@@ -45,6 +45,7 @@
 # Kernel Module Compile Results
 *.mod*
 *.cmd
+.env
 .tmp_versions/
 modules.order
 Module.symvers

So many 04:05

Terminal we are gonna minimize and we're going to do 04:09

A make directory. 04:16

Sublime Text > Program.cs — telnyx 04:21

Sir, we're going to touch and big name. 04:23

Going, Tio. 04:40

Code > Program.cs — dotnet-walkthru 04:41

I'm gonna move that too. 04:43

04:45

Commit 0bc9181027177f5614049b4a0e5e95082afece94
--- Program.cs
+++ Program.cs
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Logging;
+using dotenv.net;
 
 namespace dotnet_walkthru
 {

04:45

Commit 0bc9181027177f5614049b4a0e5e95082afece94
--- Program.cs
+++ Program.cs
@@ -13,6 +14,8 @@ namespace dotnet_walkthru
     {
         public static void Main(string[] args)
         {
+            DotEnv.Config();
+
             CreateHostBuilder(args).Build().Run();
         }
 

04:45

Commit 0bc9181027177f5614049b4a0e5e95082afece94
--- Program.cs
+++ Program.cs
@@ -20,7 +23,10 @@ namespace dotnet_walkthru
             Host.CreateDefaultBuilder(args)
                 .ConfigureWebHostDefaults(webBuilder =>
                 {
-                    webBuilder.UseStartup<Startup>();
+                  string Port = Environment.GetEnvironmentVariable("TELNYX_APP_PORT");
+                  webBuilder.UseStartup<Startup>();
+                  string[] urls = new string[] { $"http://localhost:{Port}", "https://localhost:8001" };
+                  webBuilder.UseUrls(urls);
                 });
     }
 }

Yep, for there and get it on. 04:53

Sign this K. Ah needs are 05:00

I said, we're not in dancers. 05:05

Ward. 05:11

All right. 05:15

Way through our a fault. 05:16

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 05:31

Ah! 05:38

Grab our apartment. 05:39

Patient in there and give us a double R 05:45

Cool. 05:54

And you run here. 05:57

Teo. 06:04

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru/Controllers 06:12

Sublime Text > TelnyxMessagingController.cs — telnyx 06:22

Code > TelnyxMessagingController.cs — dotnet-walkthru 06:42

Sublime Text > TelnyxMessagingController.cs — telnyx 06:52

Mom. No messages. 06:53

Hello. 06:58

And in theory, we should execute here. 07:00

Once they missed something. 07:09

Code > TelnyxMessagingController.cs — dotnet-walkthru 07:13

Natalie. 07:19

Off. 07:22

Sublime Text > TelnyxMessagingController.cs — telnyx 07:23

Code > TelnyxMessagingController.cs — dotnet-walkthru 07:33

Should work. 07:38

07:43

Commit 22735e99233d8f7815f47874bfdf53c0752b1215
--- Controllers/TelnyxMessagingController.cs
+++ Controllers/TelnyxMessagingController.cs
@@ -14,6 +14,61 @@ using Amazon.S3.Transfer;
 using Amazon;
 
 namespace dotnet_walkthru.Controllers{
+  public class WebhookHelpers
+  {
+    public static async Task<dynamic> deserializeCallbackToDynamic(HttpRequest request)
+    {
+      string json;
+      using (var reader = new StreamReader(request.Body))
+      {
+        json = await reader.ReadToEndAsync();
+      }
+      dynamic webhook = JsonConvert.DeserializeObject<dynamic>(json);
+      return webhook;
+    }
+    public static async Task<String> UploadFileAsync(string filePath)
+    {
+      string bucketName = System.Environment.GetEnvironmentVariable("TELNYX_MMS_S3_BUCKET");
+      RegionEndpoint bucketRegion = RegionEndpoint.USEast2;
+      IAmazonS3 s3Client = new AmazonS3Client(bucketRegion);
+      TransferUtility fileTransferUtility = new TransferUtility(s3Client);
+      string fileName = System.IO.Path.GetFileName(filePath);
+      string mediaUrl = "";
+      try
+      {
+        TransferUtilityUploadRequest fileTransferUtilityRequest = new TransferUtilityUploadRequest
+        {
+          BucketName = bucketName,
+          FilePath = filePath,
+          CannedACL = S3CannedACL.PublicRead
+        };
+        await fileTransferUtility.UploadAsync(fileTransferUtilityRequest);
+        Console.WriteLine("Upload completed");
+        mediaUrl = $"https://{bucketName}.s3.amazonaws.com/{fileName}";
+      }
+      catch (AmazonS3Exception e)
+      {
+        Console.WriteLine("Error encountered on server. Message:'{0}' when writing an object", e.Message);
+      }
+      catch (Exception e)
+      {
+        Console.WriteLine("Unknown encountered on server. Message:'{0}' when writing an object", e.Message);
+      }
+      return mediaUrl;
+    }
+
+    public static async Task<string> downloadMediaAsync(string directoryPath, string fileName, Uri uri)
+    {
+      HttpClient httpClient = new HttpClient();
+      string uriWithoutQuery = uri.GetLeftPart(UriPartial.Path);
+      string fileExtension = Path.GetExtension(uriWithoutQuery);
+      string path = Path.Combine(directoryPath, $"{fileName}{fileExtension}");
+      Directory.CreateDirectory(directoryPath);
+      byte[] imageBytes = await httpClient.GetByteArrayAsync(uri);
+      await File.WriteAllBytesAsync(path, imageBytes);
+      return path;
+    }
+  }
 
   [ApiController]
   [Route("messaging/[controller]")]

07:52

Commit e255b4ac366b0b6ef9b4cb4863ded3fd01834322
--- Program.cs
+++ Program.cs
@@ -15,7 +15,6 @@ namespace dotnet_walkthru
         public static void Main(string[] args)
         {
             DotEnv.Config();
-
             CreateHostBuilder(args).Build().Run();
         }
 

Ah! 07:53

Big on Eso. 08:11

08:15

Commit c01940d751c8c9a4b4c42fa6ad8e736d93801c29
--- obj/dotnet-walkthru.csproj.nuget.dgspec.json
+++ obj/dotnet-walkthru.csproj.nuget.dgspec.json
@@ -42,7 +42,7 @@
             },
             "Microsoft.AspNetCore.Mvc.NewtonsoftJson": {
               "target": "Package",
-              "version": "[*, )"
+              "version": "[3.1.8, )"
             },
             "Telnyx.net": {
               "target": "Package",

08:15

Commit c01940d751c8c9a4b4c42fa6ad8e736d93801c29
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -423,7 +423,7 @@
   "projectFileDependencyGroups": {
     ".NETCoreApp,Version=v3.1": [
       "AWSSDK.S3 >= 3.5.1",
-      "Microsoft.AspNetCore.Mvc.NewtonsoftJson >= *",
+      "Microsoft.AspNetCore.Mvc.NewtonsoftJson >= 3.1.8",
       "Telnyx.net >= 2.1.1",
       "dotenv.net >= 2.1.1"
     ]

08:15

Commit c01940d751c8c9a4b4c42fa6ad8e736d93801c29
--- obj/project.assets.json
+++ obj/project.assets.json
@@ -469,7 +469,7 @@
           },
           "Microsoft.AspNetCore.Mvc.NewtonsoftJson": {
             "target": "Package",
-            "version": "[*, )"
+            "version": "[3.1.8, )"
           },
           "Telnyx.net": {
             "target": "Package",

08:15

Commit c01940d751c8c9a4b4c42fa6ad8e736d93801c29
--- obj/project.nuget.cache
+++ obj/project.nuget.cache
@@ -1,6 +1,6 @@
 {
   "version": 2,
-  "dgSpecHash": "u6aPa5dVoyGYNRJp9bh6FVGJKI3jos+9Bv6W6Sy3EdRGwVZRZ9F8xeyzOaR/O1zMh0oOmHoXfeWep5sPOehcAg==",
+  "dgSpecHash": "G6VQOsl5st8wCFr02RrNYYMO2PLXrLLrX0lX6xCk6Ah0QJ/guRkLXjW/ciV/d1SKK3Agnk+SLzNfgESxXNaw/Q==",
   "success": true,
   "projectFilePath": "/Users/localadmin/code/dotnet-walkthru/dotnet-walkthru.csproj",
   "expectedPackageFiles": [

iStat Menus Status > 08:23

Code > TelnyxMessagingController.cs — dotnet-walkthru 08:34

Okay? 08:44

Uh, 08:45

Google Chrome > localhost:8000 08:54

Messages > 09:04

Code > TelnyxMessagingController.cs — dotnet-walkthru 09:14

In the world. 09:19

Listen, the Texas City 09:21

Uh, 09:24

We have our domestic 09:34

What a wonderful group and a slow Oh, goodness. So slow and stretching twice. I can't time. Oh, but Ah, alright were going ah ISS back over here to see what's up. 09:38

Sublime Text > Startup.cs — telnyx 09:45

Code > Startup.cs — dotnet-walkthru 09:55

All right. 09:58

10:06

Commit 14aa9a211d1eadc4bf027c1b420622025fa6d6a8
--- Startup.cs
+++ Startup.cs
@@ -34,6 +34,7 @@ namespace dotnet_walkthru
                 {
                     await context.Response.WriteAsync("Hello World!");
                 });
+              endpoints.MapControllers();
             });
         }
     }

10:56

Commit c10ac8d2997ba4771a406e7702eb6c004441bad2
--- Startup.cs
+++ Startup.cs
@@ -16,7 +16,10 @@ namespace dotnet_walkthru
         // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
         public void ConfigureServices(IServiceCollection services)
         {
-        }
+          services.AddControllers().AddNewtonsoftJson();
+
+
+          }
 
         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
         public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

Messages > 12:27

Code > Startup.cs — dotnet-walkthru 12:37

Messages > 12:47

iTerm2 > localadmin@C02W60KZHV2V: ~/code/dotnet-walkthru 13:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment