00:00:06.312 --> 00:00:07.642 We go through this. 00:00:12.342 --> 00:00:13.982 And you're alive. Take it away. 00:00:24.412 --> 00:00:28.260 Alright, so I just have a blank project set up right here for 00:00:28.260 --> 00:00:31.858 the demo and we're gonna be creating a brand new provider 00:00:31.858 --> 00:00:34.402 and this is pretty much just gonna be a. 00:00:35.252 --> 00:00:38.876 Recreation of the National Weather Service weather provider 00:00:38.876 --> 00:00:42.681 that I did for anaerobe couple months ago because I thought it 00:00:42.681 --> 00:00:46.063 would be a good example and a lot of the steps would be 00:00:46.063 --> 00:00:49.082 already done and able to complete pretty quickly. 00:00:50.282 --> 00:00:53.679 Because the entire implementation of a new provider 00:00:53.679 --> 00:00:57.860 would take pretty long, so the very first thing you're gonna do 00:00:57.860 --> 00:01:02.040 is click on the 04 providers and we're going to add a brand new 00:01:02.040 --> 00:01:02.562 project. 00:01:05.872 --> 00:01:09.683 And from the project templates we are going to pick class 00:01:09.683 --> 00:01:13.626 library and specifically not using the .NET Framework class 00:01:13.626 --> 00:01:17.042 library. But we just want the normal class library. 00:01:18.832 --> 00:01:19.902 So we're going to pick that. 00:01:19.492 --> 00:01:21.882 As a as a pro tip here. 00:01:22.732 --> 00:01:26.205 Umm, something that can make this easier because of how 00:01:26.205 --> 00:01:30.050 specific some of the setup is for new projects you can create 00:01:30.050 --> 00:01:33.212 the folder in the 04 providers directory directly. 00:01:34.702 --> 00:01:38.003 And then copy in one of the other CS prod files from 00:01:38.003 --> 00:01:41.427 something else and then just rename and adjust the the 00:01:41.427 --> 00:01:45.475 content inside that csproj file and then come into Visual Studio 00:01:45.475 --> 00:01:49.024 and add a project like Add an existing project to the 04 00:01:49.024 --> 00:01:50.082 providers folder. 00:01:51.752 --> 00:01:55.406 I I find that typically Visual Studio wants to set it up as if 00:01:55.406 --> 00:01:58.712 it as if there was, you know nothing else that's already 00:01:58.712 --> 00:02:02.366 configuring it and you end up with a lot of extra stuff in the 00:02:02.366 --> 00:02:05.962 CS project. You have to strip out manually, whereas if you go 00:02:05.962 --> 00:02:07.702 and just grab like one of the. 00:02:08.722 --> 00:02:12.740 One of the existing ones you can you can kind of cut through a 00:02:12.740 --> 00:02:16.439 lot of that and and have a a functional provide excuse me 00:02:16.439 --> 00:02:17.842 provider with all the. 00:02:19.072 --> 00:02:20.482 Copy the plugins folder. 00:02:22.962 --> 00:02:25.223 Post build steps and stuff already put in there, ready to 00:02:25.223 --> 00:02:27.172 go, and then you just start writing your code so. 00:02:28.782 --> 00:02:32.508 You can do it this way and in my, in my experience, Visual 00:02:32.508 --> 00:02:36.612 Studio tends to make it harder, so I usually just do it by hand. 00:02:37.142 --> 00:02:40.053 Yeah, I'm gonna continue this way just because it's the way I 00:02:40.053 --> 00:02:42.728 know how to do it. And I actually went through this last 00:02:40.812 --> 00:02:41.342 Yeah, no problem. 00:02:42.728 --> 00:02:45.075 night just to make sure everything was gonna work 00:02:45.075 --> 00:02:47.751 alright and it really didn't have much of a problem with 00:02:47.751 --> 00:02:49.722 creating the CS project file or anything. 00:02:50.792 --> 00:02:53.012 Which I'm gonna get to soon as the project. 00:02:50.822 --> 00:02:53.600 Yeah, yeah, the the file. Yeah, the file being created is 00:02:53.600 --> 00:02:56.521 usually not the problem. It's just that it you have to go in 00:02:56.521 --> 00:02:59.585 and like manually add the post build events to copy the plugins 00:02:59.585 --> 00:03:02.411 folder and all that other stuff. And if you just copy from 00:03:02.411 --> 00:03:05.332 another one it's it's already there. But like I said, either 00:03:05.332 --> 00:03:08.396 way works fine. It's just as a future pro tip that is something 00:03:08.396 --> 00:03:11.365 you're able to do if you want to. I find that especially once 00:03:11.365 --> 00:03:14.334 you're once you've done it once or twice, copying that csproj 00:03:14.334 --> 00:03:15.722 file to a new folder is like. 00:03:16.532 --> 00:03:17.672 Takes like 2 seconds. 00:03:25.882 --> 00:03:26.862 Right. So. 00:03:27.592 --> 00:03:31.319 We want to while creating the new project, update the location 00:03:31.319 --> 00:03:34.750 to be inside the providers folder and then we want to add 00:03:34.750 --> 00:03:37.412 this clarity dot ecommerce providers prefix. 00:03:38.082 --> 00:03:41.593 And we are going to be creating a weather provider. So we will 00:03:41.593 --> 00:03:43.042 add that on the end of it. 00:03:44.282 --> 00:03:45.182 And hit next. 00:03:46.042 --> 00:03:49.831 And net five out of support is totally fine because we are 00:03:49.831 --> 00:03:52.592 going to remove that from the csproj file. 00:03:57.332 --> 00:04:01.395 And the way that I usually do this is just go to one of the 00:04:01.395 --> 00:04:05.254 other existing providers and just double click on it and 00:04:05.254 --> 00:04:07.082 it'll open up their csproj. 00:04:07.942 --> 00:04:10.662 And I can open up the weather 1, which is pretty much empty. 00:04:11.752 --> 00:04:15.660 And yeah, this step might be a little bit quicker the way that 00:04:15.660 --> 00:04:16.962 Brendan described it. 00:04:18.532 --> 00:04:22.498 Mainly because, see. This is the target framework.net five that 00:04:22.498 --> 00:04:24.232 we're just gonna get rid of. 00:04:25.362 --> 00:04:29.628 The most annoying part about this is removing all of the tabs 00:04:29.628 --> 00:04:29.972 from. 00:04:31.872 --> 00:04:35.128 That are like auto formatted in here because that does get kind 00:04:35.128 --> 00:04:38.231 of annoying, but we just want to remove all those so there's 00:04:38.231 --> 00:04:39.502 nothing that spaces here. 00:04:39.932 --> 00:04:43.626 I think you can change in the Visual Studio settings to tell 00:04:40.162 --> 00:04:40.612 And then I. 00:04:43.626 --> 00:04:47.138 it that you prefer spaces rather than tabs and CS project 00:04:47.138 --> 00:04:50.590 documents, and it'll it'll indent with spaces instead of 00:04:50.590 --> 00:04:50.892 tabs. 00:04:51.812 --> 00:04:55.718 I did a little bit of research on that last night and I thought 00:04:55.718 --> 00:04:59.624 I had the setting turned on but was not working. There's like a 00:04:59.624 --> 00:05:03.285 text setting in advanced text setting and then there's also 00:05:01.392 --> 00:05:01.682 Umm. 00:05:03.285 --> 00:05:06.886 settings for each individual file type and one of them was 00:05:05.652 --> 00:05:07.182 Yeah, well it. 00:05:06.886 --> 00:05:08.472 overwriting the other and. 00:05:08.812 --> 00:05:13.066 It wouldn't be unlike Visual Studio to not work with all the 00:05:13.066 --> 00:05:13.902 settings so. 00:05:15.042 --> 00:05:16.292 But yeah anyway. 00:05:16.582 --> 00:05:19.392 Yeah. And to make things more complicated than they need to 00:05:19.392 --> 00:05:19.532 be. 00:05:19.822 --> 00:05:20.122 Yeah. 00:05:21.112 --> 00:05:25.145 One point where it may be getting overridden in properly 00:05:25.145 --> 00:05:29.744 is down in the editor config. It might be getting set to tabs or 00:05:29.744 --> 00:05:33.989 not or like defaulting in tabs and editor config. So if you 00:05:33.989 --> 00:05:38.092 were to go to the main editor config and then add a block 00:05:38.092 --> 00:05:41.912 that's specifically for star dot csproj and then put. 00:05:42.262 --> 00:05:45.839 Umm, the tab style as spaces and that it is too spaced. That 00:05:45.839 --> 00:05:49.474 should fix it because that that setting there should override 00:05:49.474 --> 00:05:52.992 anything else that's going on inside Visual Studio, because 00:05:52.992 --> 00:05:56.392 they're supposed to respect editor config above all else. 00:05:57.642 --> 00:05:58.782 Ah, OK, that makes sense. 00:06:03.432 --> 00:06:04.462 Umm, so I cop. 00:06:03.652 --> 00:06:04.162 Also. 00:06:05.382 --> 00:06:05.992 Sorry, go ahead. 00:06:05.932 --> 00:06:07.772 Sorry, I'm just a quick uh. 00:06:09.612 --> 00:06:13.342 Side note, while we're in here, so we removed the target 00:06:13.342 --> 00:06:15.632 framework from the property group. 00:06:16.572 --> 00:06:21.032 Can anybody tell me #1 why we removed that and #2? 00:06:21.872 --> 00:06:24.872 How it works, even though that's not in the csproj file. 00:06:30.092 --> 00:06:34.244 We see like two people not on hold or how many people are 00:06:34.244 --> 00:06:36.462 actually in the room right now. 00:06:36.862 --> 00:06:39.547 I'm here. I was going to ask you to repeat yourself. You know, 00:06:37.192 --> 00:06:37.702 Uh, yeah. 00:06:39.547 --> 00:06:41.592 that's annoying because there's only two of us. 00:06:42.572 --> 00:06:46.684 That's fine, I said. Can anyone tell me why we removed the 00:06:46.684 --> 00:06:50.796 target framework from the CS prod file and #2? Why the why 00:06:50.796 --> 00:06:53.862 this still works even after we remove that? 00:06:56.872 --> 00:07:00.572 Which I guess is. I'm just asking either Nick or or you TMK 00:07:00.452 --> 00:07:01.002 Yeah. 00:07:00.572 --> 00:07:01.682 one of one of you. 00:07:02.502 --> 00:07:04.372 I mean, my God. 00:07:02.622 --> 00:07:03.252 I'm. 00:07:04.642 --> 00:07:05.802 Go ahead, TMK. 00:07:06.482 --> 00:07:09.360 OK. I'll I'll step in the land mine, that's probably wrong 00:07:09.360 --> 00:07:09.652 first. 00:07:11.112 --> 00:07:14.767 My guess would be is because we're only using .net 472 at the 00:07:14.767 --> 00:07:18.010 moment and I'm guessing something else handles how all 00:07:18.010 --> 00:07:18.422 that's. 00:07:19.222 --> 00:07:21.182 Built out, but I could be totally wrong. 00:07:22.742 --> 00:07:27.032 I usually just remove it because I see it not in other places, so 00:07:27.032 --> 00:07:29.372 I'm kinda just following a pattern. 00:07:28.112 --> 00:07:32.600 You are you have. You have 67. OK. There you go. I I was gonna 00:07:29.252 --> 00:07:32.292 Yeah, I think it's inherited from somewhere else is. 00:07:32.600 --> 00:07:36.874 say team. OK. You have 67% of the right answer and Nick you 00:07:36.874 --> 00:07:41.219 added another like 15% to it with the part you with the part 00:07:41.219 --> 00:07:45.849 you said of it's inherited from somewhere else combined you guys 00:07:45.849 --> 00:07:48.342 have like 90% of the right answer. 00:07:49.542 --> 00:07:53.147 Which is we've remove it from the csproj files because it's 00:07:53.147 --> 00:07:56.391 defined upstream in the directory dot build dot props 00:07:56.391 --> 00:08:00.236 file. So that's in your solution items folder in Visual Studio. 00:07:59.472 --> 00:07:59.732 In. 00:08:00.236 --> 00:08:03.600 It's at the root of the directory. If you actually look 00:08:03.600 --> 00:08:05.942 at an explorer, but if you go in here. 00:08:06.732 --> 00:08:10.961 This defines tags that are put on every project, so you can see 00:08:10.961 --> 00:08:14.793 that it adds the copyright flags up there. Authors target 00:08:14.793 --> 00:08:18.956 frameworks of NET 472, so it's up the output pass the assembly 00:08:18.956 --> 00:08:22.656 versions and enable stuff like nullable, configure some 00:08:22.656 --> 00:08:26.092 warnings as errors. All that kind of stuff. This is 00:08:26.092 --> 00:08:26.752 basically. 00:08:29.212 --> 00:08:32.789 You can think of it as like the base of all of the csproj files 00:08:32.789 --> 00:08:36.478 in the solution, so anything set in here gets shared among all of 00:08:36.478 --> 00:08:39.887 them. So that's why we remove it from. Those is because it's 00:08:39.887 --> 00:08:43.352 configured here globally and that's why it's still works when 00:08:43.352 --> 00:08:46.705 we remove it from. There is because the target framework is 00:08:46.705 --> 00:08:47.822 specified elsewhere. 00:08:51.592 --> 00:08:54.458 Sorry, a bit of a detour, but just something in case in case 00:08:54.458 --> 00:08:57.323 somebody's reading this and they're like, wait, what? How do 00:08:57.323 --> 00:09:00.141 you? Why does that work? Or how do you, how are we removing 00:09:00.141 --> 00:09:02.442 that? Why does that not break stuff? That's why. 00:09:03.692 --> 00:09:04.502 Yeah, that's good. 00:09:06.942 --> 00:09:11.526 Uh, so from one of the existing providers I just picked address 00:09:11.526 --> 00:09:15.537 validation. We copied the assembly name, Assembly title 00:09:15.537 --> 00:09:20.121 and the root namespace and then the post build commands. If you 00:09:20.121 --> 00:09:24.562 pick a project that has multiple post build commands, the one 00:09:24.562 --> 00:09:28.931 that we want is the one that goes into the plugins directory 00:09:28.931 --> 00:09:32.512 and not the plugins 5 directory and there should. 00:09:31.702 --> 00:09:35.458 It will also be the one that says condition equals the net 00:09:35.458 --> 00:09:35.712 472. 00:09:36.462 --> 00:09:37.232 That also. 00:09:37.052 --> 00:09:37.422 Umm. 00:09:38.682 --> 00:09:42.092 Which on newer versions of stuff I believe is now net 48. 00:09:43.192 --> 00:09:44.912 Yeah, I was gonna say like, we should probably. 00:09:43.232 --> 00:09:45.932 Umm as of 2023.2. 00:09:47.022 --> 00:09:48.652 We should probably cover why. 00:09:47.172 --> 00:09:48.712 Yeah, that's gonna become net 48. 00:09:49.402 --> 00:09:52.399 Why we need this? Because it's probably not going to be obvious 00:09:52.399 --> 00:09:53.382 to someone who's new. 00:09:54.102 --> 00:09:55.162 The postal commands. 00:09:54.512 --> 00:09:56.902 Yeah. The Cliff notes. Yeah, the Cliff notes is. 00:09:55.422 --> 00:09:55.842 Yeah. 00:09:57.832 --> 00:10:01.362 Uh, the providers are not directly referenced by anything. 00:10:02.202 --> 00:10:06.282 Umm. And so their DLL don't live in a place that's easily 00:10:06.282 --> 00:10:10.713 accessible to the service layer or anything else that may need 00:10:10.713 --> 00:10:12.822 them or need to register them. 00:10:13.542 --> 00:10:18.156 These post build events copy the output of the build for each 00:10:18.156 --> 00:10:23.067 provider into the plugins folder at the root of these F directory 00:10:23.067 --> 00:10:23.662 and the. 00:10:24.152 --> 00:10:28.888 Umm Sev startup code loads the assemblies from that folder and 00:10:28.888 --> 00:10:32.420 uses those two register implementations of the 00:10:32.420 --> 00:10:35.802 interfaces for providers and all that stuff. 00:10:38.172 --> 00:10:42.238 And I think what you'll and just going back to this, if someone 00:10:38.392 --> 00:10:38.672 Yep. 00:10:42.238 --> 00:10:46.176 like runs into an issue where it's like, hey, this library is 00:10:46.176 --> 00:10:50.114 missing or whatever as you're building out a new thing, let's 00:10:50.114 --> 00:10:53.925 say you, you add a new nugget package to do something, some 00:10:53.925 --> 00:10:57.863 kind of library and you're like, why, why is it that when I'm 00:10:57.863 --> 00:11:01.928 heading my new endpoint for this new thing I'm making, it's not 00:11:01.928 --> 00:11:05.485 working? It's because that library isn't getting copied 00:11:05.485 --> 00:11:07.962 over into plugins and therefore isn't. 00:11:08.242 --> 00:11:09.932 Available to be referenced. 00:11:09.332 --> 00:11:14.279 Yep, Yep. If you set up new ones and you get the could not load 00:11:14.279 --> 00:11:18.916 file or assembly and then some file name that's relevant to 00:11:18.916 --> 00:11:19.302 your. 00:11:21.262 --> 00:11:26.037 Provider uh, yeah, like TMK said, you probably just need to 00:11:26.037 --> 00:11:26.992 expand this. 00:11:27.612 --> 00:11:33.646 UM Xcopy command here that that Nick is showing to include the 00:11:33.646 --> 00:11:38.242 DLL's that are added to the bin folder by your. 00:11:39.992 --> 00:11:42.122 Nugget package that you added and. 00:11:42.802 --> 00:11:46.675 Uh, a lot of times nugget packages also have their own 00:11:46.675 --> 00:11:49.632 dependencies that will need to be copied. 00:11:50.822 --> 00:11:56.219 To the plugins folder and there is a bit of a a landmine there 00:11:56.219 --> 00:12:01.530 that you can step on where if you include one that references 00:12:01.530 --> 00:12:02.472 all of the. 00:12:03.132 --> 00:12:08.077 Uh, like net standard stuff that copying all those in and loading 00:12:08.077 --> 00:12:12.272 them can have unexpected consequences and side effects. 00:12:12.272 --> 00:12:16.693 So something to watch out for, making sure that the nugget 00:12:16.693 --> 00:12:21.262 packages you use are actually compatible with NET Framework. 00:12:23.452 --> 00:12:24.182 And. 00:12:25.692 --> 00:12:26.132 Yeah. 00:12:27.512 --> 00:12:32.269 OK. Brendan, remind me to ask about that again later because I 00:12:32.269 --> 00:12:36.950 had to copy some additional DLL for the ZX ING Nugget package 00:12:36.950 --> 00:12:41.102 when of using that to generate the gift card barcodes. 00:12:42.772 --> 00:12:45.962 So I can show you that later and make sure everything looks good. 00:12:44.572 --> 00:12:44.832 Yeah. 00:12:48.942 --> 00:12:52.747 But for these copy commands there should be. I think one for 00:12:52.747 --> 00:12:56.052 DLL's, one for PDB files and then one for XML files. 00:12:57.882 --> 00:13:01.050 And you can also take this little string right here and 00:13:01.050 --> 00:13:04.612 justice hit enter and that will drop it down to the next line. 00:13:05.532 --> 00:13:07.072 And do the same thing. 00:13:08.492 --> 00:13:09.382 Again, over there. 00:13:10.792 --> 00:13:13.442 And that just makes it a little bit cleaner. Easier to see. 00:13:14.552 --> 00:13:18.173 And when you copy over the name, title and root namespace, make 00:13:18.173 --> 00:13:21.793 sure to update the name of the provider and don't just leave it 00:13:21.793 --> 00:13:25.244 as whatever provider you copied it from. Because I have also 00:13:25.244 --> 00:13:28.694 made that mistake before and then all of your files that you 00:13:28.694 --> 00:13:31.919 create are gonna be in the root namespace of a different 00:13:31.919 --> 00:13:35.482 provider that you're not making, so make sure you update that. 00:13:37.982 --> 00:13:39.992 And we can close both of these files for now. 00:13:43.702 --> 00:13:47.943 And next step is to create the provider registry which I 00:13:47.943 --> 00:13:50.992 usually just rename this existing class. 00:14:05.972 --> 00:14:09.479 I also love the name choice for obvious reasons. If you've ever 00:14:09.479 --> 00:14:09.862 made a. 00:14:10.702 --> 00:14:15.342 Likeanexample.net like rest API app. 00:14:17.122 --> 00:14:18.832 The the weather controller. 00:14:20.082 --> 00:14:20.662 What do you mean? 00:14:21.252 --> 00:14:25.977 Ohh like if you make a like a template app in whatever in .NET 00:14:25.977 --> 00:14:30.702 Framework core it's called the weather controller like the the 00:14:30.702 --> 00:14:34.677 default controller it it scaffolds out for you. So I 00:14:33.992 --> 00:14:34.772 Ah, OK. 00:14:34.677 --> 00:14:36.402 thought that was funny. 00:14:40.042 --> 00:14:43.309 Alright, so we have our new weather provider registry and it 00:14:43.309 --> 00:14:46.255 is going to inherit from registry and this is going to 00:14:46.255 --> 00:14:49.629 throw an error because we do not have the structure map nugget 00:14:49.629 --> 00:14:50.592 package installed. 00:14:51.472 --> 00:14:55.151 So I'm going to install that now. Just right click on the new 00:14:55.151 --> 00:14:57.642 provider project, manage Nugent packages. 00:15:03.062 --> 00:15:04.112 Structure map. 00:15:05.242 --> 00:15:10.002 And four point 7.1, that is the one we want install that. 00:15:20.662 --> 00:15:23.752 And here we just have to add the using statement. 00:15:27.082 --> 00:15:27.842 And there we go. 00:15:32.182 --> 00:15:36.931 And while we are here, I can also add in some documentation 00:15:36.931 --> 00:15:38.672 for these new classes. 00:15:40.982 --> 00:15:44.669 Also, the reason I used this provider is because I had all of 00:15:44.669 --> 00:15:45.322 this stuff. 00:15:46.252 --> 00:15:49.332 Ready to copy over so you can make it look nice and pretty. 00:15:51.052 --> 00:15:53.152 I think all that looks good for now. 00:15:58.192 --> 00:16:00.682 Alright, so for the so our dead. 00:15:58.562 --> 00:15:58.992 Well. 00:16:00.232 --> 00:16:03.144 Let's just say my only call out and I know he said this in a 00:16:03.144 --> 00:16:06.150 previous training, but if you're copying documentation around, 00:16:06.150 --> 00:16:09.109 just remember to actually update it, including like gears and 00:16:09.109 --> 00:16:09.872 stuff like that. 00:16:11.392 --> 00:16:15.994 Yeah, definitely make sure the file name up here matches the 00:16:15.994 --> 00:16:20.369 file name here and then the copyright date is correct and 00:16:20.369 --> 00:16:21.802 update the summary. 00:16:24.172 --> 00:16:27.602 Same thing for here and the see also references. 00:16:31.122 --> 00:16:35.566 Alright, so for step four I have adding the project references 00:16:35.566 --> 00:16:39.727 and this was a step that I was not entirely sure on, but I 00:16:39.727 --> 00:16:44.100 usually just again right click on the project here, go to add 00:16:44.100 --> 00:16:48.331 project reference and I know mostly through trial and error 00:16:48.331 --> 00:16:52.704 that the two references I need for this provider would be the 00:16:52.704 --> 00:16:53.832 registry loader. 00:16:54.652 --> 00:16:58.362 And 03 models, but I'm not sure if there's a. 00:16:59.672 --> 00:17:03.567 Like a list of basic project references that we can add when 00:17:03.392 --> 00:17:03.822 No. 00:17:03.567 --> 00:17:05.992 creating a new provider or just yeah. 00:17:05.162 --> 00:17:09.183 Ideally, the main ones that you probably wanna start with their 00:17:09.183 --> 00:17:13.078 main one. You probably start with is just registry loader and 00:17:13.078 --> 00:17:17.162 then reference the others as you need them. So if you add rather 00:17:17.162 --> 00:17:21.182 than having a base set of them that you add and then going from 00:17:21.182 --> 00:17:23.192 that, doing that just adds more. 00:17:24.192 --> 00:17:28.802 Wait, so to speak to the to the bin folder because it's gonna 00:17:28.802 --> 00:17:32.742 pull all the DLLS for those into its own bin folder. 00:17:33.342 --> 00:17:34.112 UM. 00:17:35.222 --> 00:17:35.812 So. 00:17:36.522 --> 00:17:39.412 Ideally instead UM. 00:17:40.642 --> 00:17:44.761 You just start with something like registry loader that you're 00:17:44.761 --> 00:17:45.872 99.9% gonna need. 00:17:47.962 --> 00:17:49.622 And interfaces dot workflows. 00:17:48.032 --> 00:17:51.378 And yeah, yeah. And then the workflows interface, you can do 00:17:51.378 --> 00:17:53.242 workflows dot whatever dot stuff. 00:17:53.912 --> 00:17:56.352 And it has. Well, that also has the I plugin base. 00:17:56.872 --> 00:18:00.042 Ohh yeah, obviously yeah, good point. But anyway. 00:17:56.982 --> 00:18:00.104 For a provider based. Sorry. Yeah. So you'll need those two. 00:18:00.104 --> 00:18:03.123 And then, like, you don't wanna necessarily pull in models 00:18:00.902 --> 00:18:01.242 Yeah. 00:18:03.123 --> 00:18:06.091 unless you need to, because those are concrete and you're 00:18:06.091 --> 00:18:08.802 supposed to be programming everything to interfaces. 00:18:09.652 --> 00:18:10.162 And. 00:18:09.952 --> 00:18:13.205 Yeah, but yeah, so ultimately just only reference what you 00:18:13.205 --> 00:18:16.567 what you're plugin actually needs to compile, because having 00:18:16.567 --> 00:18:18.772 extra stuff is just copying extra DLLS. 00:18:18.952 --> 00:18:23.018 Umm. And to to elaborate on that, whenever a project 00:18:23.018 --> 00:18:25.242 reference is another project. 00:18:26.652 --> 00:18:30.452 The the top level project when it builds it has in its bin 00:18:30.452 --> 00:18:34.637 folder the DLL of every project it references, and every project 00:18:34.637 --> 00:18:38.372 those projects reference recursively all the way down the 00:18:38.372 --> 00:18:42.429 line. That's a done at framework thing that's different in net 00:18:42.429 --> 00:18:43.072 core, but. 00:18:44.072 --> 00:18:46.192 But it we are currently .NET Framework, so it's just 00:18:46.192 --> 00:18:47.592 something you have to be aware of. 00:18:48.852 --> 00:18:52.912 That every project reference you add is just copying more data 00:18:52.912 --> 00:18:57.101 into more folders and taking up more and more space on disks. So 00:18:57.101 --> 00:19:01.032 keeping that dependency tree as tight and small as possible. 00:19:01.522 --> 00:19:05.701 Uh is just saving yourself some some build time and and disk 00:19:05.701 --> 00:19:06.112 space. 00:19:08.252 --> 00:19:08.802 Gotcha. 00:19:17.602 --> 00:19:21.581 Alright, so we get those project references added. Next we are 00:19:21.581 --> 00:19:25.622 going to create the new provider base class. So let's add that. 00:19:43.902 --> 00:19:48.452 Alright. And the base class, we are going to update to public 00:19:48.452 --> 00:19:49.112 abstract. 00:19:50.522 --> 00:19:54.128 And at least the ones I looked at, I'm not sure if this applies 00:19:54.128 --> 00:19:57.790 to every base class in Seth, but pretty much all the ones that I 00:19:57.790 --> 00:20:00.889 looked at were all abstract classes for the base class 00:20:00.889 --> 00:20:03.142 specifically, not for the rest of them. 00:20:04.502 --> 00:20:08.302 But this one in case is going to be abstract and then this is 00:20:08.302 --> 00:20:09.772 also going to implement. 00:20:11.122 --> 00:20:12.902 Or inherit from for later dates. 00:20:20.052 --> 00:20:23.959 Uh. And then, uh, once we added this, one of the things that I 00:20:23.959 --> 00:20:27.927 did in the past that I kind of discovered accidentally was just 00:20:27.927 --> 00:20:31.710 to remove the abstract. And now I can use this suggestion to 00:20:31.710 --> 00:20:35.368 implement the rest of those fields that I'm gonna need for 00:20:35.368 --> 00:20:38.282 later. And I'll just add the abstract back in. 00:20:39.042 --> 00:20:39.972 Were uh. 00:20:41.112 --> 00:20:43.552 I would not do it that way, for one. 00:20:45.272 --> 00:20:48.583 Because you just did it with not even inceptions. Now you gotta 00:20:48.583 --> 00:20:51.634 replace all those and some of them are defined in provider 00:20:51.634 --> 00:20:53.392 based that don't need to be here. 00:20:55.892 --> 00:20:59.640 Uh, yeah, this has valid configuration. I'm gonna end up 00:20:59.640 --> 00:21:03.124 moving to the specific like National Weather Service 00:21:03.124 --> 00:21:07.002 provider that we make. That's not the based one. And then. 00:21:08.732 --> 00:21:09.942 The rest of them. 00:21:10.812 --> 00:21:14.312 So what I would have done is is like how you did the implement 00:21:14.312 --> 00:21:17.755 implement here there's a second option on that menu that says 00:21:17.755 --> 00:21:21.365 implement abstractly. That will make each of these come out that 00:21:21.365 --> 00:21:24.642 way as abstract so that they're ready to go be overridden. 00:21:26.172 --> 00:21:26.762 Umm. 00:21:27.802 --> 00:21:30.662 And it seems that it's not on your menu. 00:21:31.552 --> 00:21:32.332 With that. 00:21:33.602 --> 00:21:35.752 And I don't know why, because that would have been. 00:21:38.982 --> 00:21:39.352 Part. 00:21:40.122 --> 00:21:42.852 Does he have to do like public abstract class and then like? 00:21:45.132 --> 00:21:47.172 Yeah, try try leaving it abstract. 00:21:50.672 --> 00:21:53.752 And then try the control period on the class itself. 00:21:58.062 --> 00:21:58.732 Let's see. 00:22:02.532 --> 00:22:04.192 Generate overrides, no? 00:22:06.882 --> 00:22:08.732 I don't know why it's not showing up for you. 00:22:09.622 --> 00:22:12.992 To be fair, I've never seen implement abstractly either so. 00:22:12.872 --> 00:22:18.402 I did it. I did it the other day on a thing with the. 00:22:15.142 --> 00:22:16.362 Yeah, I wonder if that's a. 00:22:19.692 --> 00:22:23.283 When we were doing the, what's it called the the the the two 00:22:23.283 --> 00:22:25.342 separate providers for gift cards. 00:22:26.432 --> 00:22:28.132 Wonder if it's a Resharper thing. 00:22:26.792 --> 00:22:27.572 Is that you, Nick? 00:22:29.812 --> 00:22:32.234 Well, no, because it was in the light bulb. It was in there. The 00:22:32.234 --> 00:22:34.022 Visual Studio light bulb menu that we did that. 00:22:35.552 --> 00:22:38.573 Yeah, I've seen multiple options there before, but I'd never knew 00:22:38.222 --> 00:22:38.512 Uh. 00:22:38.573 --> 00:22:39.442 what triggered him. 00:22:40.172 --> 00:22:42.257 Just double checking what version of Visual Studio are you 00:22:42.257 --> 00:22:42.892 currently running. 00:22:44.012 --> 00:22:45.722 Uh, this should be. 00:22:45.182 --> 00:22:46.972 Go to help and then. 00:22:49.362 --> 00:22:52.502 About vision about Visual Studio at the bottom. 00:22:49.812 --> 00:22:50.552 To help in about. 00:22:55.772 --> 00:23:00.267 17 at 44, maybe it was an option to add to get got added in 17-5 00:23:00.267 --> 00:23:00.612 or 6. 00:23:01.762 --> 00:23:04.672 But yeah, always keep that up to date if can too, but. 00:23:08.992 --> 00:23:09.412 OK. 00:23:09.112 --> 00:23:12.302 So I don't know. Maybe. But there was, like, I swear there 00:23:12.302 --> 00:23:15.330 was an option there that would say let would give you a 00:23:15.330 --> 00:23:18.790 different there to say instead of override with non implemented 00:23:18.790 --> 00:23:22.142 it would say override with an empty and then another one that 00:23:22.142 --> 00:23:25.494 said override is abstract so that all the properties would be 00:23:25.494 --> 00:23:28.792 abstract and told to inherit to the next to whatever there's 00:23:28.792 --> 00:23:29.062 this. 00:23:30.802 --> 00:23:31.232 Thing. 00:23:33.142 --> 00:23:34.232 Gotcha. OK. 00:23:39.852 --> 00:23:42.542 I'm gonna leave it like that. Just for right now. 00:23:48.342 --> 00:23:50.052 And I'm also. 00:23:51.362 --> 00:23:52.752 Add comments in here. 00:23:55.522 --> 00:23:59.188 All right, so after the new provider base class, we updated 00:23:59.188 --> 00:24:01.692 the method signature. Did that did that? 00:24:03.022 --> 00:24:07.880 We can create the new provider based interface which is going 00:24:07.880 --> 00:24:12.895 to go in O2 interfaces and then workflows and inside interfaces 00:24:12.895 --> 00:24:15.872 workflows we have a providers folder. 00:24:17.412 --> 00:24:21.029 And here we are going to have to add a new folder for the weather 00:24:21.029 --> 00:24:21.522 provider. 00:24:28.962 --> 00:24:31.312 And then add our interface down in here. 00:24:43.822 --> 00:24:46.272 And this is going to be called I weather provider base. 00:24:48.792 --> 00:24:51.222 So I could switch this public. 00:24:52.732 --> 00:24:55.632 Grab the comments for this guy as well. 00:24:59.602 --> 00:25:03.680 And we want to update the namespace here and delete. I 00:25:03.680 --> 00:25:07.981 think it's just the under score workflows so now clarity, 00:25:07.981 --> 00:25:10.872 ecommerce interface providers weather. 00:25:11.772 --> 00:25:12.482 I'm. 00:25:13.592 --> 00:25:14.422 Yeah, that's right. 00:25:21.392 --> 00:25:25.629 Now this just like the base class implemented provider base, 00:25:25.629 --> 00:25:28.892 this is going to implement I've provider base. 00:25:30.682 --> 00:25:31.362 There we go. 00:25:33.452 --> 00:25:35.002 Add comments on to that. 00:25:38.072 --> 00:25:41.902 And while we are here, I can clean up some of that stuff. 00:25:45.322 --> 00:25:49.715 So we have a eye weather provider base implementing eye 00:25:49.715 --> 00:25:54.734 provider base. We got the file header up at the top. We updated 00:25:54.734 --> 00:25:55.832 the namespace. 00:25:59.992 --> 00:26:03.377 Ah, now we come back here and along with provider base, we are 00:26:03.377 --> 00:26:05.902 going to attach the interface we just created. 00:26:12.532 --> 00:26:12.932 There we go. 00:26:21.792 --> 00:26:25.622 And add the comments in summary and stuff in there as well. 00:26:27.522 --> 00:26:29.792 Like clean up some of this stuff while I'm in here. 00:26:39.452 --> 00:26:42.962 So now we've got the new provider interface completed. 00:26:48.212 --> 00:26:52.102 All right, now we are ready to move all into the actual. 00:26:53.122 --> 00:26:58.427 Umm, specific service that we are going to be using so not the 00:26:58.427 --> 00:26:59.942 base class but me. 00:27:00.972 --> 00:27:02.122 Close some of this stuff. 00:27:03.592 --> 00:27:06.393 So down we have a weather provider base or weather 00:27:06.393 --> 00:27:09.742 provider registry. I'm going to create a new folder in here. 00:27:11.202 --> 00:27:14.752 In this National Weather Service. 00:27:16.552 --> 00:27:19.948 And this is where we were actually going to be sending 00:27:19.948 --> 00:27:23.591 value or sending data out to pull in weather forecasts for 00:27:23.591 --> 00:27:24.702 specific location. 00:27:25.932 --> 00:27:29.525 If we add more provider weather providers in the future, they 00:27:29.525 --> 00:27:32.653 will each get their own directory here. So if there's 00:27:32.653 --> 00:27:36.071 another API that somebody else wants to use instead of the 00:27:36.071 --> 00:27:39.663 National Weather Service, we can just come inside the weather 00:27:39.663 --> 00:27:42.212 provider project, add a new directory here. 00:27:42.902 --> 00:27:47.488 And implemented. However, differently from this one that 00:27:47.488 --> 00:27:48.372 we need to. 00:27:49.752 --> 00:27:51.672 But I'm going to add a base class in here. 00:28:01.362 --> 00:28:04.982 I also am pretty sure that all of the. 00:28:05.762 --> 00:28:10.521 Classes for the specific weather providers or specific providers, 00:28:10.521 --> 00:28:14.631 whether it's shipping or payments or whatever, are going 00:28:14.631 --> 00:28:16.722 to be have the provider name. 00:28:17.392 --> 00:28:21.231 At the end of whatever the actual proper noun is at the 00:28:21.231 --> 00:28:25.138 front. So National Weather Service, weather provider, or 00:28:25.138 --> 00:28:26.782 FedEx shipping provider. 00:28:27.842 --> 00:28:30.466 But make sure you have this prefix at the end of the file 00:28:30.466 --> 00:28:30.692 name. 00:28:32.042 --> 00:28:34.332 Yep, that is going to be a class that looks good. 00:28:43.052 --> 00:28:46.208 Right, I just tried a couple things. Apparently it's you 00:28:46.208 --> 00:28:49.253 could do it to the interface when you already have the 00:28:49.253 --> 00:28:52.852 interface having like a function call or something you're trying 00:28:52.852 --> 00:28:56.118 to add to it on there and then you could tell the thing to 00:28:56.118 --> 00:28:59.551 implement interface abstractly. That's what it does. So I was 00:28:59.551 --> 00:29:02.872 confusing the provider based parts with the interface part. 00:29:04.532 --> 00:29:05.042 OK. 00:29:11.702 --> 00:29:14.746 Alright, so now that we have created our National Weather 00:29:14.746 --> 00:29:15.952 Service provider class. 00:29:17.552 --> 00:29:21.647 This namespace I think needs to be updated where you're going to 00:29:21.647 --> 00:29:25.301 back that down just to the general weather name space. We 00:29:25.301 --> 00:29:29.144 have our new class here. This needs to inherit from our base 00:29:29.144 --> 00:29:29.522 class. 00:29:32.742 --> 00:29:33.572 Just like that. 00:29:38.182 --> 00:29:40.922 Add the summary and references in there. 00:29:50.702 --> 00:29:55.026 Those will come back and clean up later. So next step I have is 00:29:55.026 --> 00:29:59.484 actually implementing those base class class members that we hold 00:29:59.484 --> 00:30:01.172 in using that suggestion. 00:30:02.112 --> 00:30:06.098 For the provider type, since this is a brand new project, 00:30:06.098 --> 00:30:10.564 this wasn't an existing like. I wasn't coming into shipping here 00:30:10.564 --> 00:30:14.618 and adding a new shipping provider to an existing project. 00:30:14.618 --> 00:30:18.740 In this case we created a brand new project for the weather 00:30:18.740 --> 00:30:21.832 provider so I can ask 12 into provider type. 00:30:22.722 --> 00:30:26.104 And this is just an enum of all of the different types that we 00:30:26.104 --> 00:30:28.412 have. So I'm going to copy the bottom one. 00:30:43.352 --> 00:30:44.712 And now we have. 00:30:45.572 --> 00:30:46.642 The weather provider. 00:30:47.512 --> 00:30:50.952 And an enum constant for it. We can close that right away. 00:31:01.312 --> 00:31:05.662 And this is going to be enums dot provider type. 00:31:07.092 --> 00:31:11.581 Dat weather and we are going to add this prefix to the same 00:31:11.581 --> 00:31:16.069 thing over here. And James, I don't exactly remember why we 00:31:16.069 --> 00:31:18.462 didn't use this ecommerce enums. 00:31:19.632 --> 00:31:21.752 Umm. And we decided to. 00:31:21.272 --> 00:31:24.936 Enums enums themselves can appear like like it'll say, like 00:31:24.936 --> 00:31:28.661 a A provider type, or it'll say something else like that. It 00:31:28.661 --> 00:31:32.507 will look like it's a class to someone who's not expecting it. 00:31:32.507 --> 00:31:36.354 So in most cases I try not to include the using interface. I'm 00:31:36.354 --> 00:31:39.896 sorry, using the namespace of enums instead put enums dot 00:31:39.896 --> 00:31:43.864 prefix in front of my enum when I'm calling it so that it's more 00:31:43.864 --> 00:31:46.062 clear that I'm reading an enum out. 00:31:47.292 --> 00:31:48.472 Gotcha. OK. 00:31:47.462 --> 00:31:48.612 Wherever it's being used. 00:31:49.952 --> 00:31:53.004 Yeah, see, this is complaining saying name could be simplified. 00:31:53.004 --> 00:31:55.865 Just removing this, but we're going to leave that there and 00:31:55.865 --> 00:31:58.582 both of these cases and just delete the using statement. 00:31:57.592 --> 00:31:59.222 And then get rid of line eight, yeah. 00:32:00.042 --> 00:32:00.552 Yeah. 00:32:04.872 --> 00:32:08.588 Alright. And Next up is has valid configuration which for 00:32:08.588 --> 00:32:11.662 the moment I'm just gonna cut that out of here. 00:32:12.332 --> 00:32:15.277 Because that will get implemented in our National 00:32:15.277 --> 00:32:17.102 Weather Service provider class. 00:32:18.382 --> 00:32:23.329 This class or this folder does not have a config file yet, but 00:32:23.329 --> 00:32:26.312 it will eventually where we'll store. 00:32:27.052 --> 00:32:30.014 Any of the app settings and everything and then this is just 00:32:30.014 --> 00:32:32.976 going to determine whether or not that configuration has all 00:32:32.976 --> 00:32:35.840 the values that it needs, but the base class does not need 00:32:35.840 --> 00:32:37.102 that, so we can delete it. 00:32:42.192 --> 00:32:46.242 As default provider we are giving to set to true. 00:32:50.762 --> 00:32:54.372 And is default provider. You're going to set the false. 00:32:55.842 --> 00:33:00.130 And for these, we are just going to remove the throw not 00:33:00.130 --> 00:33:01.032 implemented. 00:33:02.262 --> 00:33:04.132 And removes throw not implemented. 00:33:08.742 --> 00:33:10.942 And while we're here, we might as well. 00:33:11.822 --> 00:33:12.642 At these. 00:33:22.352 --> 00:33:24.718 All right. And that should handle the base class 00:33:24.718 --> 00:33:25.442 implementation. 00:33:28.262 --> 00:33:31.625 Alright, next step is updating the registry that we created in 00:33:31.625 --> 00:33:32.372 the beginning. 00:33:34.582 --> 00:33:37.669 So now we can create our constructor for the weather 00:33:37.669 --> 00:33:38.542 provider class. 00:33:53.112 --> 00:33:56.816 And Brendan or James, if you wanna explain this part a little 00:33:56.816 --> 00:33:59.802 bit, you would be much better at it than I would. 00:34:02.812 --> 00:34:03.552 So. 00:34:04.552 --> 00:34:05.842 Interfaces. 00:34:07.622 --> 00:34:11.405 In essence, what we're doing here is like we were saying 00:34:11.405 --> 00:34:15.453 earlier, we don't work with concretes directly, we work with 00:34:15.453 --> 00:34:19.700 interfaces, but you can't have an instance of an interface. You 00:34:19.700 --> 00:34:23.417 can't new up an interface because an interface isn't an 00:34:23.417 --> 00:34:27.199 actual thing. It's basically just defining how something 00:34:27.199 --> 00:34:31.446 works and something else has to or the way you can interface or 00:34:31.446 --> 00:34:35.627 something. And it's the name and something else defines how it 00:34:35.627 --> 00:34:37.352 implements that interface. 00:34:37.832 --> 00:34:41.777 What we're doing here is this. This registry class is part of 00:34:41.777 --> 00:34:45.785 structure map and the four and add methods that you're calling 00:34:45.785 --> 00:34:49.794 there on line 20 are members of that class. What this actually 00:34:49.794 --> 00:34:53.166 physically does is tells structure map, which is our 00:34:53.166 --> 00:34:57.301 dependency injection framework, that if somebody asks for an eye 00:34:57.301 --> 00:35:01.118 weather provider base, they don't have to know or care what 00:35:01.118 --> 00:35:05.190 whether provider we're using or what you know where it's coming 00:35:05.190 --> 00:35:07.862 from. We're just going to give them back. 00:35:07.962 --> 00:35:11.057 Like instance of the National Weather Service weather 00:35:11.057 --> 00:35:14.323 provider, that's the the concrete implementation of that 00:35:14.323 --> 00:35:17.302 interface that they're going to get back and again. 00:35:18.382 --> 00:35:21.826 In the code they're just working with I weather provider base, 00:35:21.826 --> 00:35:25.106 which means if you have methods on National Weather Service 00:35:25.106 --> 00:35:28.440 weather provider that are not part of the interface, they're 00:35:28.440 --> 00:35:31.719 not going to be able to call them. They don't know anything 00:35:31.719 --> 00:35:35.217 about the implementation, they can only call I weather provider 00:35:35.217 --> 00:35:36.802 based methods because that's. 00:35:37.542 --> 00:35:40.455 What we're giving them is a whether an eye weather provider 00:35:40.455 --> 00:35:43.076 base at runtime, the implementation of that interface 00:35:43.076 --> 00:35:45.745 will be the National Weather Service weather provider, 00:35:45.745 --> 00:35:47.832 because that's what we're specifying here. 00:35:48.222 --> 00:35:52.237 Umm. And that's how we that's effectively how we separate 00:35:52.237 --> 00:35:56.460 interface from implementation and how we define which one to 00:35:56.460 --> 00:36:00.682 use at runtime is with these four and add statements. And if 00:36:00.682 --> 00:36:04.490 you look at like the payment providers or the shipping 00:36:04.490 --> 00:36:08.712 providers, you can see in those that we conditionally enable 00:36:08.712 --> 00:36:12.381 certain providers if the configurations for them are 00:36:12.381 --> 00:36:16.534 correct. So you can see that if the FedEx shipping provider 00:36:16.534 --> 00:36:18.472 config is valid on line 113. 00:36:18.842 --> 00:36:22.791 Only in that scenario do we add the FedEx shipping provider to 00:36:22.791 --> 00:36:26.300 the dependency injection container. Otherwise the FedEx 00:36:26.300 --> 00:36:30.123 provider is not added at all and it won't be used. So that's 00:36:30.123 --> 00:36:33.695 effective of what we're doing here is we are telling our 00:36:33.695 --> 00:36:37.644 dependency injection framework what implementation to use when 00:36:37.644 --> 00:36:39.962 somebody asks for a given interface. 00:36:45.162 --> 00:36:45.912 Awesome. Thank you. 00:36:48.952 --> 00:36:50.592 Alright, what do we have next? 00:36:54.992 --> 00:36:59.380 Alright, now we can create a config class for our weather 00:36:59.380 --> 00:37:03.842 provider. So I will come back here to our weather project. 00:37:04.972 --> 00:37:07.902 Didn't mean to open you except. 00:37:13.912 --> 00:37:16.182 Add new class. 00:37:26.622 --> 00:37:30.063 And I'm starting to think I probably should have abbreviated 00:37:30.063 --> 00:37:30.852 this with NWS. 00:37:32.422 --> 00:37:33.842 These names are getting pretty long. 00:37:38.602 --> 00:37:43.326 Right now config classes I believe all stay as internal and 00:37:43.326 --> 00:37:46.632 this is also going to be internal static. 00:37:47.762 --> 00:37:51.642 I can grab the method or the file header. 00:37:52.682 --> 00:37:53.332 And that in. 00:38:00.522 --> 00:38:03.132 And just add some app settings here. 00:38:04.172 --> 00:38:07.422 We're just gonna copy these from one of the existing ones. 00:38:23.882 --> 00:38:25.892 Maybe a little bit differently. There we go. 00:38:27.532 --> 00:38:31.331 Uh, so this is just an app setting key for the base URL for 00:38:31.331 --> 00:38:35.382 the National Weather Service. So you would go on to like their. 00:38:36.122 --> 00:38:38.442 API documentation somewhere online. 00:38:39.062 --> 00:38:42.681 Umm and can save those values here, either in the default 00:38:42.681 --> 00:38:44.552 value or in your app settings. 00:38:45.242 --> 00:38:46.612 Let me grab. 00:38:49.592 --> 00:38:51.232 Elements for that, just to make it a little bit. 00:38:51.922 --> 00:38:55.042 Easier to look at and then one of the. 00:38:56.672 --> 00:39:00.739 Tips for creating these config files is to add the generate app 00:39:00.739 --> 00:39:02.772 settings key up at the very top. 00:39:03.652 --> 00:39:07.752 So just show the app settings client file real quick. 00:39:10.292 --> 00:39:14.865 So for say cards for example, we have a clarity carts validation 00:39:14.865 --> 00:39:18.874 and then whole bunch of different app settings. Here all 00:39:18.874 --> 00:39:20.562 within this category so. 00:39:21.722 --> 00:39:26.066 Whole bunch of them for clarity cards validation. If we say 00:39:26.066 --> 00:39:29.902 generate app settings key up at the top here on the. 00:39:31.102 --> 00:39:34.948 Config class, then every one of the app settings we create 00:39:34.948 --> 00:39:38.598 underneath of it will get prefixed with this string and 00:39:38.598 --> 00:39:42.704 it'll be clarity dot weather, dot National Weather Service dot 00:39:42.704 --> 00:39:46.615 base URL and we don't have to repeat this part every single 00:39:46.615 --> 00:39:49.482 time for every app setting that we created. 00:39:55.082 --> 00:39:58.612 And another one left update the name here. 00:40:01.832 --> 00:40:08.092 And then for most config files that I see in providers have a. 00:40:09.472 --> 00:40:14.062 Is valid down here we add this so that stops complaining. 00:40:16.972 --> 00:40:20.305 Uh, yeah, these configs are going to have a is valid 00:40:20.305 --> 00:40:21.122 function for. 00:40:22.032 --> 00:40:25.864 Checking or not whether the config is valid and inside this 00:40:25.864 --> 00:40:27.652 last line they have a check. 00:40:28.342 --> 00:40:29.412 All valid keys. 00:40:30.112 --> 00:40:33.282 And this is just a list of all of the different. 00:40:34.092 --> 00:40:34.762 Config. 00:40:35.932 --> 00:40:39.929 Class members that are going to be required for that provider to 00:40:39.929 --> 00:40:40.482 function. 00:40:41.162 --> 00:40:42.252 Umm so this. 00:40:43.352 --> 00:40:47.293 Obviously needs a base URL to be able to make calls to an 00:40:47.293 --> 00:40:51.301 external API, and I know in this case the National Weather 00:40:51.301 --> 00:40:55.649 Service requires a user agent be set in the request headers, or 00:40:55.649 --> 00:40:59.590 else it's gonna fail the authentication. So both of these 00:40:59.590 --> 00:41:00.812 would be required. 00:41:01.612 --> 00:41:03.402 And I can also take the user agent. 00:41:04.402 --> 00:41:08.640 And add it down to this field down here. So now if either of 00:41:08.640 --> 00:41:09.682 these keys are. 00:41:11.122 --> 00:41:14.786 No or empty. It is gonna fail and it's not gonna be a valid 00:41:14.786 --> 00:41:18.023 configuration for using the National Weather Service 00:41:18.023 --> 00:41:18.572 provider. 00:41:21.842 --> 00:41:24.122 And I clean some of this up on here. 00:41:47.412 --> 00:41:51.325 All right, I think that is everything we needed from this 00:41:51.325 --> 00:41:51.662 file. 00:41:52.492 --> 00:41:56.072 Before we move on, I had a quick question slash comment. 00:41:56.502 --> 00:41:57.142 Yeah, go for it. 00:41:58.672 --> 00:42:04.282 What I have done once at least probably only once once app, but 00:42:04.282 --> 00:42:09.454 I know with these config class names for providers can get 00:42:09.454 --> 00:42:11.732 pretty long like this one. 00:42:12.442 --> 00:42:14.592 What I have done sometimes is you can do like. 00:42:15.412 --> 00:42:18.322 Using config equals whatever. 00:42:19.092 --> 00:42:21.212 Like National Weather Service provider config. 00:42:22.412 --> 00:42:24.302 That way you don't have like tons of. 00:42:25.112 --> 00:42:25.622 Uh. 00:42:26.522 --> 00:42:30.012 Super long redundant, you know. 00:42:31.142 --> 00:42:33.682 Strings of text in your file that are hard to read. 00:42:34.412 --> 00:42:36.672 Or hard to look at, I guess it's pretty he's up. 00:42:36.672 --> 00:42:39.502 There's also this which is just pasted it in the chat. 00:42:46.352 --> 00:42:50.142 Using static National Weather Service, weather provider config 00:42:50.142 --> 00:42:50.382 and. 00:42:50.342 --> 00:42:54.217 Yes. So you do that over in your provider file and then so like 00:42:54.217 --> 00:42:57.607 switch back over to your provider file and then on your 00:42:57.607 --> 00:43:01.179 hazard configuration, instead of throw new not implemented 00:43:01.179 --> 00:43:03.782 exception, just type is valid and pass in. 00:43:04.122 --> 00:43:08.750 Uh is default provider. Double ampersand is default provider 00:43:08.750 --> 00:43:09.812 app activated. 00:43:11.732 --> 00:43:16.430 Yeah. Yeah, that you gotta add the using static up at the top 00:43:16.430 --> 00:43:20.748 to get the the Intellisense thing though to not be angry 00:43:20.748 --> 00:43:21.202 there. 00:43:29.902 --> 00:43:32.232 Still isn't like that using static. 00:43:33.112 --> 00:43:34.472 Are they in the same namespace? 00:43:33.332 --> 00:43:35.032 Maybe I still did differently than yours. 00:43:35.472 --> 00:43:38.276 Yeah, yeah. Or the namespace is different. Possibly go to the 00:43:38.276 --> 00:43:39.722 other file and check real quick. 00:43:44.232 --> 00:43:47.922 Yeah, National Weather Service provider. 00:43:45.512 --> 00:43:48.268 Yeah, so you need to add the dot net worth Shannon Weather 00:43:48.268 --> 00:43:49.062 Service Online 5. 00:43:49.382 --> 00:43:53.505 Ohh also yeah. Also your class names are different. You have 00:43:53.505 --> 00:43:57.223 National Weather Service provider config and James put 00:43:57.223 --> 00:44:00.602 National Weather Service weather provider config. 00:44:02.052 --> 00:44:02.642 OK. 00:44:02.842 --> 00:44:05.441 Your class names don't match and then they use it and then the 00:44:03.672 --> 00:44:04.002 OK. 00:44:05.441 --> 00:44:06.472 name space is also wrong. 00:44:07.432 --> 00:44:10.052 Things to remove that second word. Weather from that, yeah. 00:44:11.742 --> 00:44:14.335 Good enough. And then and the other class, you still got to 00:44:14.335 --> 00:44:15.112 fix the namespace. 00:44:16.652 --> 00:44:17.912 Or add it to this file. 00:44:16.812 --> 00:44:20.582 So right here. Yeah, yeah. In your provider file, add it, add 00:44:20.582 --> 00:44:22.102 National Weather Service. 00:44:22.162 --> 00:44:22.982 On line 5. 00:44:27.222 --> 00:44:27.992 Yeah, there it is. 00:44:28.732 --> 00:44:30.452 Now it figured it out. 00:44:30.652 --> 00:44:34.224 Now, even though is Dell, it is not a function of this provider. 00:44:34.224 --> 00:44:37.796 It is a function of the config. But it's seeing it. It's allowed 00:44:37.796 --> 00:44:41.258 to just automatically resolve it, which only works with static 00:44:41.258 --> 00:44:41.752 elements. 00:44:42.152 --> 00:44:42.762 Very cool. 00:44:42.492 --> 00:44:45.666 On things later on, if you want to use reference your API key 00:44:45.666 --> 00:44:48.737 and your your user agents, you don't have to type the whole 00:44:48.737 --> 00:44:51.706 config class name. You can literally just type them as if 00:44:51.706 --> 00:44:54.162 they were properties directly inside this file. 00:44:56.272 --> 00:44:57.762 OK, awesome. 00:44:57.122 --> 00:44:58.592 That's cool. I didn't know about that either. 00:44:57.242 --> 00:44:58.042 Yeah, that's cool. 00:44:59.102 --> 00:45:00.032 Yeah, that is cool. 00:44:59.762 --> 00:45:00.292 Yeah. 00:45:02.022 --> 00:45:03.272 Like this is what I did. 00:45:04.142 --> 00:45:06.118 I'm just following along a little bit on mine just to 00:45:06.118 --> 00:45:08.460 double check what I can do for the Resharper versus what you're 00:45:08.460 --> 00:45:09.082 doing without it. 00:45:11.102 --> 00:45:13.312 If I can get my screenshot to show up. 00:45:13.742 --> 00:45:17.106 I'm going to be abusing that a lot because I was just using. 00:45:17.106 --> 00:45:20.579 I'd be like using config equals blah blah blah config or using 00:45:20.579 --> 00:45:24.107 extensions equals blah blah blah extensions for static classes. 00:45:24.107 --> 00:45:26.312 But yeah, that's actually super useful. 00:45:27.622 --> 00:45:27.982 Yeah. 00:45:30.202 --> 00:45:31.852 So is there a specific? 00:45:33.282 --> 00:45:36.607 For like a provider project where we want the namespaces to 00:45:36.607 --> 00:45:39.988 be because now my registry is gonna get an error. I probably 00:45:39.988 --> 00:45:40.652 need to add. 00:45:40.962 --> 00:45:43.492 You need to add that to your registry, yes. 00:45:44.112 --> 00:45:46.922 So is everything supposed to be in this namespace? 00:45:44.592 --> 00:45:45.132 Uh, we want. 00:45:47.842 --> 00:45:51.596 At everything for that provide for the National Weather 00:45:51.596 --> 00:45:55.349 provider needs to be in the national. So hold on, don't 00:45:55.349 --> 00:45:59.437 don't add it right there to line 5 add a using statement for 00:45:59.437 --> 00:46:01.112 National Weather Service. 00:46:02.322 --> 00:46:05.915 Yeah. So the provider itself is just in providers dot weather 00:46:05.915 --> 00:46:08.232 implementations of the provider are in. 00:46:09.092 --> 00:46:11.582 Uh namespaces for each individual implementation. 00:46:14.512 --> 00:46:14.992 OK. 00:46:15.222 --> 00:46:18.720 So if we were to add, I don't know, I guess like a weather.com 00:46:18.720 --> 00:46:22.161 weather provider to go query weather.com, then you would have 00:46:22.161 --> 00:46:25.770 a. That's a terrible example cuz I can't think of what you would 00:46:25.770 --> 00:46:27.712 call the name weather com I guess. 00:46:27.342 --> 00:46:30.879 I I would rather I would actually call it weather dot dot 00:46:27.992 --> 00:46:28.552 The. 00:46:30.879 --> 00:46:31.122 com. 00:46:32.392 --> 00:46:36.524 That works too, but but yeah, so then you'd have a another. Then 00:46:36.524 --> 00:46:40.338 you all the stuff for that weather.com provider would be in 00:46:40.338 --> 00:46:43.516 a clarity.ecommerce.providers.weather.weather.com 00:46:43.516 --> 00:46:47.330 namespace and then this file would have a using weather.com 00:46:47.330 --> 00:46:47.902 and then. 00:46:48.602 --> 00:46:52.392 Uh, that basically just keeps them kind of self-contained. 00:46:54.102 --> 00:46:54.572 Gotcha. 00:46:54.902 --> 00:46:58.267 And and helps keep you from accidentally having one calling 00:46:58.242 --> 00:46:58.502 Yeah. 00:46:58.267 --> 00:46:59.332 in the other stuff. 00:47:03.372 --> 00:47:06.463 Because the only place where they the namespace we start 00:47:06.463 --> 00:47:09.932 crossing over is in this file, the registry where you're trying 00:47:09.932 --> 00:47:13.022 to add them all in as possible additions to the process. 00:47:14.792 --> 00:47:18.798 Yeah, in that case, we would have another one of these 4I 00:47:18.798 --> 00:47:22.182 weathered provider base ad weather.com provider. 00:47:20.452 --> 00:47:23.282 Weather.com provider? Yeah, exactly. 00:47:22.102 --> 00:47:25.248 Yeah. And then it would depend on whether it was on whether, 00:47:25.248 --> 00:47:28.188 whether whether, whether, if this is supposed to be like 00:47:28.188 --> 00:47:31.437 shipping providers, where you're allowed to have more than one 00:47:31.437 --> 00:47:34.531 provider, you would do, would add them together as a chain. 00:47:34.531 --> 00:47:37.522 But if it's supposed to be that you only use one and it's 00:47:37.522 --> 00:47:40.513 supposed to be only the one that's active and configured, 00:47:40.513 --> 00:47:43.298 then you would have if statements that make sure that 00:47:43.298 --> 00:47:46.392 each one would check to see if it was active in configured. 00:47:46.562 --> 00:47:49.622 It would add it and then it would would return it and not 00:47:49.622 --> 00:47:52.840 try to add anything else and then at the end of the function 00:47:52.840 --> 00:47:56.269 there would be like the default of like if none of them say that 00:47:56.269 --> 00:47:59.592 they're active, then what do we give it so that which might be 00:47:59.592 --> 00:48:02.599 like a mock provider that doesn't do anything but return 00:48:02.599 --> 00:48:05.817 junk data? Something like that. So that you had something to 00:48:05.817 --> 00:48:09.140 fall back on for services that required there to be a provider 00:48:09.140 --> 00:48:09.562 present. 00:48:10.112 --> 00:48:13.105 Umm we even if it wasn't one that worked so that it could 00:48:13.105 --> 00:48:16.148 then report out we don't support this function because you 00:48:16.148 --> 00:48:17.902 haven't enabled it type of thing. 00:48:22.362 --> 00:48:23.052 OK, cool. 00:48:30.612 --> 00:48:31.212 Had. 00:48:32.232 --> 00:48:34.272 Right. So we got the. 00:48:35.302 --> 00:48:39.603 Yep, has valid configuration is implemented in the base class. 00:48:39.603 --> 00:48:41.582 That was the last step there. 00:48:45.092 --> 00:48:49.001 So now if we were going to actually do some implementation 00:48:49.001 --> 00:48:53.174 for some of the actual method calls, which I can copy in there 00:48:53.174 --> 00:48:53.902 real quick. 00:48:55.182 --> 00:48:58.332 And need to be defined in the interface. 00:49:01.182 --> 00:49:03.542 And I'm going to have to import some more stuff. 00:49:12.132 --> 00:49:14.878 This is one of those things that it's nicer with Resharper 00:49:14.878 --> 00:49:17.810 because the imports it will do will automatically be the short 00:49:17.810 --> 00:49:20.602 names instead of having to go up and manually correct them. 00:49:23.622 --> 00:49:27.472 Yeah, I do need to still install that. I've been. 00:49:28.452 --> 00:49:30.102 Procrastinating on that quite a bit. 00:49:34.292 --> 00:49:37.273 So let's go to our wedding provider base. Now. This guy is 00:49:37.273 --> 00:49:40.102 going to be complaining because it is not implementing. 00:49:41.102 --> 00:49:43.582 Everything in the interface so we can add a. 00:49:44.862 --> 00:49:46.292 Well, before you do that. 00:49:47.382 --> 00:49:49.579 This is where the other thing I was talk about earlier was from. 00:49:49.579 --> 00:49:51.032 So go ahead and kill what you just pasted. 00:49:52.442 --> 00:49:55.892 And then go to the squiggly on that thing and control period. 00:49:57.082 --> 00:49:59.940 Which will bring it to light bulb and then say implement 00:49:59.940 --> 00:50:00.992 interface abstractly. 00:50:05.392 --> 00:50:08.204 Now it's an abstract function that it definition that meets 00:50:08.204 --> 00:50:11.015 the interface so that it's happy and says that the only the 00:50:11.015 --> 00:50:12.842 implementation class actually runs it. 00:50:13.542 --> 00:50:14.542 Or does anything with it? 00:50:15.762 --> 00:50:16.532 Ah, OK. 00:50:19.382 --> 00:50:21.927 And the only thing you would then correct is like short name 00:50:21.927 --> 00:50:24.513 on the usings and then because the the line is really long, I 00:50:24.513 --> 00:50:25.972 would wrap the function arguments. 00:50:27.142 --> 00:50:28.452 Yeah, definitely. 00:50:31.752 --> 00:50:32.772 Whoop, not there. 00:50:34.292 --> 00:50:35.082 That's a dictionary. 00:50:38.812 --> 00:50:40.842 And you have to put that space back in after the comma. 00:50:43.542 --> 00:50:44.072 There you go. 00:50:47.192 --> 00:50:50.287 And if you don't have it for those listening to the recording 00:50:50.287 --> 00:50:52.482 later on, there's the extension guidelines. 00:50:53.512 --> 00:50:56.174 You can add a guideline at character 120 which will give 00:50:56.174 --> 00:50:59.069 you like little red dashed line or whatever color you want to 00:50:59.069 --> 00:51:01.918 make it. They'll give you a visual representation of how far 00:51:01.918 --> 00:51:03.692 you should go before you should stop. 00:51:05.002 --> 00:51:06.372 And on stuff. 00:51:07.242 --> 00:51:10.921 You could see it in my screen shot that I I pasted it in the 00:51:10.921 --> 00:51:11.222 chat. 00:51:11.972 --> 00:51:14.331 If you want to bring that up for a second, just so we can see it 00:51:14.331 --> 00:51:14.802 in the video. 00:51:20.552 --> 00:51:22.989 Yeah, so that dashed line towards the end of the file 00:51:22.989 --> 00:51:25.923 there on the right side, that's the guidelines extension letting 00:51:25.923 --> 00:51:28.721 me know where character 120 is so that I can make sure I stay 00:51:28.721 --> 00:51:29.352 underneath it. 00:51:31.362 --> 00:51:32.082 Ah, OK. 00:51:32.772 --> 00:51:33.342 Nice. 00:51:34.382 --> 00:51:37.176 And it does show up fine in dark mode as well, and you can adjust 00:51:37.176 --> 00:51:39.886 what color you want it to be. So if it's dark mode and you want 00:51:39.886 --> 00:51:42.553 it to be like a bright yellow or something so that it shows up 00:51:42.553 --> 00:51:45.220 better for you, you're welcome to do that kind of thing in the 00:51:45.220 --> 00:51:45.812 configuration. 00:51:46.752 --> 00:51:47.892 And what was the name of that? 00:51:48.802 --> 00:51:50.022 As ariturk guidelines. 00:51:50.982 --> 00:51:51.872 Yeah, cool. 00:51:59.462 --> 00:52:03.432 So we updated the base class now. 00:52:05.372 --> 00:52:06.342 Back over here. 00:52:13.202 --> 00:52:14.252 You can do that for now. 00:52:13.812 --> 00:52:14.202 Yep. 00:52:16.222 --> 00:52:20.630 And we are going to replace this throw not implemented exception 00:52:20.630 --> 00:52:22.732 with the actual implementation. 00:52:35.172 --> 00:52:38.709 Yep. And now we just have to add a whole bunch of using 00:52:38.709 --> 00:52:40.982 statements to affect a lot of this. 00:52:43.452 --> 00:52:47.082 And the async keyword on your uh function definition. 00:52:48.582 --> 00:52:52.377 So after the word override, put async, don't make a lot of this 00:52:52.377 --> 00:52:52.732 happy. 00:52:53.412 --> 00:52:54.722 Yeah, I think a lot of them. 00:52:56.542 --> 00:53:00.046 And then there's also two other method calls in here that it's 00:53:00.046 --> 00:53:01.992 also going to complain or missing. 00:53:07.842 --> 00:53:11.907 And I don't know if you said it already, but just to uh, clarify 00:53:11.907 --> 00:53:13.032 for the recording. 00:53:13.812 --> 00:53:16.682 Umm, we're not showing actually implementing all this logic 00:53:16.682 --> 00:53:19.742 that's been written before. So Nick is just copying a completed 00:53:19.742 --> 00:53:22.707 implementation to show kind of what this might look like when 00:53:22.707 --> 00:53:25.768 it's done. So this code is just coming from a completed project 00:53:25.768 --> 00:53:28.685 just in case someone's watching this recording later and was 00:53:28.685 --> 00:53:31.411 like, wait, where are you getting all this stuff? You're 00:53:31.411 --> 00:53:34.089 copying in the answer is this has already been done for 00:53:34.089 --> 00:53:36.719 another project. We're just documenting the process of 00:53:36.719 --> 00:53:39.540 creating new providers. So obviously this is a limitation. 00:53:39.540 --> 00:53:42.123 Stuff will depend on the provider you're implementing 00:53:42.123 --> 00:53:44.322 anyway, so doesn't really make sense to show. 00:53:44.762 --> 00:53:47.972 Building out a specific providers. Since you know, then 00:53:47.972 --> 00:53:50.092 you wouldn't need that specific one. 00:53:49.302 --> 00:53:49.792 Yeah. 00:53:52.082 --> 00:53:56.052 Yeah, and this would take very long time, but I really like 00:53:56.052 --> 00:53:56.382 this. 00:53:57.542 --> 00:53:58.592 What we did with the. 00:53:57.632 --> 00:54:00.029 They could just double click that config class name and just 00:54:00.029 --> 00:54:00.932 get rid of it entirely. 00:54:01.652 --> 00:54:02.062 Yeah. 00:54:01.882 --> 00:54:04.302 Because it'll find base URL on your other side. 00:54:04.892 --> 00:54:08.462 Yeah, it's just crazy. That's how much it shortened the name 00:54:08.462 --> 00:54:12.032 of trying to reference that value. But yeah, that's awesome. 00:54:14.262 --> 00:54:15.472 And yeah, that would be. 00:54:14.532 --> 00:54:15.522 But yeah, and and. 00:54:16.262 --> 00:54:21.200 Two, I think it was TMK's point earlier. The alternative way of 00:54:21.200 --> 00:54:26.060 doing that would be like a using alias instead where you did a 00:54:26.060 --> 00:54:30.689 using using config equal to and then the full namespace and 00:54:30.689 --> 00:54:35.627 class name of it. And then you could use config dot base URL as 00:54:35.627 --> 00:54:39.252 your name. That does work with class instance. 00:54:40.482 --> 00:54:42.722 Types instead of only static types. 00:54:43.802 --> 00:54:44.472 But. 00:54:45.792 --> 00:54:47.142 That is another way to go with it. 00:54:49.112 --> 00:54:51.942 You know, obviously if it's static, I mean what you showed 00:54:51.942 --> 00:54:53.572 us is pretty, pretty awesome, so. 00:54:53.122 --> 00:54:53.772 Yeah. 00:54:54.772 --> 00:54:57.844 Obviously, if there's name clashing, I guess with method 00:54:57.844 --> 00:55:01.294 names then maybe you'd want to use the using instead maybe, but 00:55:00.942 --> 00:55:04.292 Yeah, that that's the only downside is you gotta make sure 00:55:01.294 --> 00:55:01.832 otherwise. 00:55:02.512 --> 00:55:02.882 Yeah. 00:55:04.292 --> 00:55:07.641 that what you're implementing doesn't clash with something 00:55:07.641 --> 00:55:10.934 else that was trying to be implemented by either a nugget 00:55:10.934 --> 00:55:14.170 package or the system DLLS or anything like that so that 00:55:14.170 --> 00:55:17.747 you're not running into clashing with it. And even if you are, 00:55:17.747 --> 00:55:21.380 you can still prefix the thing like the base URL there with the 00:55:21.380 --> 00:55:24.672 actual class name, or with another alias that you've got. 00:55:24.742 --> 00:55:27.132 Going in there, you can actually use them both at the same time. 00:55:27.452 --> 00:55:28.022 OK. 00:55:27.642 --> 00:55:30.634 And you can put them both in there and then you use the alias 00:55:30.634 --> 00:55:33.626 just to tell the code like this is the one I was trying to do 00:55:33.626 --> 00:55:36.472 here, even though it ordinarily would be cracked clashing. 00:55:39.042 --> 00:55:41.502 So now my question would be now that you brought these other 00:55:41.502 --> 00:55:44.002 functions in, are these gonna be callable from anywhere else? 00:55:44.002 --> 00:55:46.462 Because if not, I would make them private and then move them 00:55:46.462 --> 00:55:47.832 below the public implementations. 00:55:50.822 --> 00:55:55.456 I think they are well, only one of them is, but yeah, I could do 00:55:55.456 --> 00:55:55.812 that. 00:55:57.112 --> 00:55:58.302 So not that guy. 00:55:59.812 --> 00:56:00.822 Yeah, yeah. 00:56:01.492 --> 00:56:03.452 The your your two method guys. 00:56:02.412 --> 00:56:03.502 That was configuration. 00:56:05.342 --> 00:56:08.802 And then, per style cop rules and stuff gets ordered by the 00:56:08.802 --> 00:56:12.493 kind of thing it is, and then by it's accessibility. So private 00:56:12.493 --> 00:56:14.972 functions would go after public functions. 00:56:25.852 --> 00:56:29.654 And I just want to confirm this, because I always forget to do 00:56:29.654 --> 00:56:33.395 this every time something is asynchronous. We wanna put async 00:56:33.395 --> 00:56:36.412 at the end, right? No matter what where it is OK. 00:56:35.042 --> 00:56:35.442 Yes. 00:56:37.072 --> 00:56:41.438 Yeah, it it is doing. If it is returning a task, meaning that 00:56:41.438 --> 00:56:45.805 it is async or value task, you should have an async suffix on 00:56:45.805 --> 00:56:47.142 your function name. 00:56:48.722 --> 00:56:50.912 I keep saying function I mean method but whatever. 00:56:54.592 --> 00:56:57.402 Yeah, I was missing out on one of them. I was a good catch. 00:56:59.352 --> 00:57:03.335 Also, on your logic there online 81 you have not checked valid 00:57:03.335 --> 00:57:06.875 key. There is an alternative version that is just check 00:57:06.875 --> 00:57:10.857 invalid key so that you don't have to write in double negative 00:57:10.857 --> 00:57:11.552 type stuff. 00:57:15.002 --> 00:57:18.241 And if that function doesn't exist wherever you are, you're 00:57:18.241 --> 00:57:21.803 welcome to add them so that they are clear. That'll keep you it's 00:57:21.803 --> 00:57:25.041 less symbols and less mental gymnastics to to physically go 00:57:25.041 --> 00:57:26.282 through and find stuff. 00:57:29.832 --> 00:57:33.157 And not to get sidetracked. Uh, but when we do these little like 00:57:33.157 --> 00:57:35.612 let's say we we add something like that, right? 00:57:38.262 --> 00:57:41.124 Let's say it's it's separate PR to make it simple and we say, 00:57:41.124 --> 00:57:43.062 oh, this is a core candidate or whatever. 00:57:43.732 --> 00:57:47.053 Do we ever go through and check PR's that are marked as core 00:57:47.053 --> 00:57:50.210 candidate and and try to pull those in? Or how? How do we 00:57:50.210 --> 00:57:51.952 handle that? Or do we right now? 00:57:52.862 --> 00:57:56.392 There is totes a process to read and do that. 00:57:57.242 --> 00:57:57.692 Wink. 00:57:57.312 --> 00:57:57.662 OK. 00:57:58.452 --> 00:57:58.892 Wink. 00:57:58.562 --> 00:58:02.941 Yeah, it's something we've intended to for a long time. 00:57:59.662 --> 00:58:00.112 OK. 00:58:02.941 --> 00:58:07.555 We've tried to figure out ways to get that process and and 00:58:07.555 --> 00:58:10.682 motion and actually do it consistently. 00:58:11.312 --> 00:58:16.583 Uh, most of the problem, obviously, is that none of us 00:58:16.112 --> 00:58:17.942 Yeah, yeah. Now I get that. But. 00:58:16.583 --> 00:58:18.882 have time. Uh, it's but. 00:58:17.642 --> 00:58:21.631 The the closest that hasn't occurred is near the end of our 00:58:21.631 --> 00:58:22.162 project. 00:58:22.602 --> 00:58:26.260 Umm. If I'm gonna do a cleanup on it, I will do a compare with 00:58:26.260 --> 00:58:29.686 core and I will yank over everything that I think is worth 00:58:29.686 --> 00:58:33.344 bringing back to core with a win merge which has nothing to do 00:58:33.344 --> 00:58:35.492 with actually looking at the stupid. 00:58:36.762 --> 00:58:39.619 PR's themselves because some of those PR's could be more than 00:58:39.619 --> 00:58:42.521 two years old, and I literally can't even get to them in Azure 00:58:42.521 --> 00:58:43.212 DevOps anymore. 00:58:44.252 --> 00:58:44.762 Umm. 00:58:44.972 --> 00:58:48.063 But that's also like a really bad practice for us, and we 00:58:48.063 --> 00:58:51.419 shouldn't be having to do that. And we should be doing it when 00:58:51.419 --> 00:58:54.723 the core candidates go in to try and make core related Cherry 00:58:52.882 --> 00:58:53.332 Yeah. 00:58:54.723 --> 00:58:55.042 picks. 00:58:55.352 --> 00:58:59.790 Yeah. And I and just as as a sort of side note here because 00:58:55.772 --> 00:58:56.202 Yeah. 00:58:59.790 --> 00:59:03.192 Alex asked me about this a not that long ago. 00:59:04.982 --> 00:59:08.326 If you have a bug fix for something core and you have any 00:59:08.326 --> 00:59:11.843 time, obviously validate that the you know validate with one 00:59:11.843 --> 00:59:15.590 of us at the fix looks correct, just like send us a PR link that 00:59:15.590 --> 00:59:19.338 that is a core candidate and say hey is this look like a correct 00:59:19.338 --> 00:59:23.028 way to fix this problem for core and you can send that to James 00:59:23.028 --> 00:59:26.717 me you can send it to Eric and he'll probably ultimately end up 00:59:26.717 --> 00:59:30.349 setting it to one of us as well. Or he may be able to validate 00:59:30.349 --> 00:59:31.502 himself as well but. 00:59:32.542 --> 00:59:36.713 If we if you get the sign off from us and you have the time, 00:59:36.713 --> 00:59:40.884 people are more than welcome to make PR's into core that fix 00:59:40.884 --> 00:59:41.362 things. 00:59:41.922 --> 00:59:45.569 Umm, now keeping in mind that we do tend to have more stringent 00:59:42.132 --> 00:59:42.512 Umm. 00:59:45.569 --> 00:59:48.645 review process for stuff going into like development, 00:59:48.645 --> 00:59:50.582 especially into release branches. 00:59:52.532 --> 00:59:55.760 Because those need to be release branches, particularly need to 00:59:55.760 --> 00:59:58.886 be as stable as possible and develop. We just wanna make sure 00:59:58.886 --> 01:00:02.012 we understand everything that's coming into the product, but. 01:00:03.422 --> 01:00:06.064 But at the same time, we also don't wanna gatekeep and say, 01:00:06.064 --> 01:00:08.661 you know, if you want, if you wanna fix something in core, 01:00:08.661 --> 01:00:11.478 just mark it as a core candidate and we'll do it for you or or, 01:00:11.478 --> 01:00:14.252 you know, you're not allowed or whatever. People are more than 01:00:14.252 --> 01:00:15.572 welcome to make pull requests. 01:00:17.542 --> 01:00:20.265 As long as it's, you know, a valid fix and it's and it's not 01:00:20.265 --> 01:00:23.121 fixing something in a janky way that's gonna cause problems and 01:00:23.121 --> 01:00:25.352 other places or break something else or whatever. 01:00:25.892 --> 01:00:29.685 And ultimately we, the way we get this thing stable and and 01:00:29.685 --> 01:00:33.478 and you know working well on everything is when everybody's 01:00:33.478 --> 01:00:37.144 allowed to contribute and work on it. So and that kind of 01:00:36.292 --> 01:00:36.572 Yeah. 01:00:37.144 --> 01:00:41.252 that's a two way St. of we allow it and you guys actually do it. 01:00:37.892 --> 01:00:38.252 I. 01:00:41.382 --> 01:00:45.497 I I would say as far as making it more official specifically, 01:00:45.497 --> 01:00:46.492 if you want to. 01:00:47.982 --> 01:00:51.220 CC Eric on your message. Specifically, Eric would and 01:00:51.220 --> 01:00:55.057 will coordinate with Brandon and we'll make sure that there are 01:00:55.057 --> 01:00:58.534 hours in the Sprint or the following Sprint for you to go 01:00:58.534 --> 01:01:00.992 back and make your core copy of that PR. 01:01:02.172 --> 01:01:02.822 On stuff. 01:01:04.012 --> 01:01:07.846 That way it does get to come in because he had he and Brendan 01:01:07.846 --> 01:01:11.741 have the actual right ability to adjust your Sprint, you know, 01:01:11.741 --> 01:01:15.760 hour blocks and and allocations and get that kind of stuff in if 01:01:15.760 --> 01:01:19.656 you're sending it to BL and I we're gonna be doing code review 01:01:19.656 --> 01:01:23.428 on it, which we're gonna be doing code review on the core PR 01:01:23.428 --> 01:01:27.137 candidate anyway. So if you wanna get it in there and write 01:01:24.712 --> 01:01:25.072 Umm. 01:01:27.137 --> 01:01:31.095 it up and put it in there, we'll tell you if it's too janky and 01:01:31.095 --> 01:01:33.382 you need to make some changes to it. 01:01:33.482 --> 01:01:33.802 Yeah. 01:01:34.282 --> 01:01:37.898 And and then we'll accept it. Or it might be that like ohh I I 01:01:37.898 --> 01:01:41.457 see what you did here. I'm not gonna make you bother spending 01:01:41.457 --> 01:01:44.844 another half an hour trying to fix it. I'll go in and I'll 01:01:44.844 --> 01:01:47.886 manually edit it myself by either pulling it down or 01:01:47.886 --> 01:01:51.272 editing it in Azure DevOps directly to unjustified it. And 01:01:51.272 --> 01:01:54.486 then it will be. It should succeed right through on its 01:01:54.486 --> 01:01:56.552 pull request requirements for core. 01:01:57.112 --> 01:01:58.272 Yeah, I think. 01:01:57.442 --> 01:02:00.888 Umm and often it will ask you to target like whichever release 01:02:00.888 --> 01:02:04.059 the the client was on so that you can you can target that 01:02:02.992 --> 01:02:03.302 Yeah. 01:02:04.059 --> 01:02:07.395 release. That way everyone could because the goal is for the 01:02:07.395 --> 01:02:10.785 release itself is supposed to be stable and everyone who's on 01:02:10.785 --> 01:02:14.340 that release should at any time be able to pull the release back 01:02:14.340 --> 01:02:17.566 into their project to take in other people's fixes without 01:02:16.592 --> 01:02:16.972 Umm. 01:02:17.566 --> 01:02:20.792 taking in other peoples changes that were client specific. 01:02:21.602 --> 01:02:25.596 And stuff and then we will be able to take the the contents 01:02:25.596 --> 01:02:29.389 that were brought into those release branches and cherry 01:02:29.389 --> 01:02:33.249 picked them to develop. So they're available for the next 01:02:33.249 --> 01:02:35.112 version of Seth to come out. 01:02:36.012 --> 01:02:38.696 OK. Yeah. That makes sense. Yeah. 'cause, I think a good 01:02:38.696 --> 01:02:41.662 example and it's just small one is like registration on beacon 01:02:41.662 --> 01:02:42.462 in the front end. 01:02:43.272 --> 01:02:46.282 Uh, well, I guess it was core react. 01:02:47.502 --> 01:02:51.063 Doesn't support. Doesn't actually like working support 01:02:51.063 --> 01:02:54.753 non e-mail usernames and the client wanted that and it's 01:02:54.753 --> 01:02:58.897 basically hard coded to be like. Nope, it's it's an e-mail like 01:02:58.897 --> 01:03:03.105 no matter what, I don't care. So like an example like that. Like 01:03:03.105 --> 01:03:06.212 basically PR was basically just a core bug fix. 01:03:07.272 --> 01:03:07.652 Yeah. 01:03:07.572 --> 01:03:08.892 So yeah, I thought I'd ask. 01:03:14.882 --> 01:03:15.472 Sorry, nick. 01:03:16.362 --> 01:03:20.177 Yeah, no problem. No, it was good. Yeah. The only other thing 01:03:20.177 --> 01:03:23.992 I had left, I mean, we had the base implementation all set up 01:03:23.992 --> 01:03:27.622 and no errors. This is pretty much ready to start testing. 01:03:29.062 --> 01:03:33.272 Once you add the call to, I think it's very. 01:03:35.162 --> 01:03:36.582 There will be a call to get. 01:03:35.162 --> 01:03:38.871 Let me double check. Have you added whether as a type of 01:03:38.871 --> 01:03:43.034 provider to the provider types and have you added a git weather 01:03:43.034 --> 01:03:46.612 provider to the registration registry leader provider? 01:03:48.282 --> 01:03:53.268 The first question is yes. For provider type, we did create a 01:03:53.268 --> 01:03:57.931 new weather provider type, the second one in the registry 01:03:57.931 --> 01:04:00.182 loader. I don't think I did. 01:04:02.282 --> 01:04:03.482 So let's do that. 01:04:06.342 --> 01:04:07.432 She little wrapper. 01:04:07.992 --> 01:04:09.292 Rapper not Luke. 01:04:13.802 --> 01:04:16.252 You'll add it to the. You know I'm here. 01:04:24.832 --> 01:04:27.096 In quick question, what's the difference between this the item 01:04:27.096 --> 01:04:27.742 and the other one? 01:04:28.362 --> 01:04:28.942 Umm. 01:04:28.982 --> 01:04:32.895 The the ones that are on this enum are in turn internally to. 01:04:32.895 --> 01:04:36.871 The RW are have been migrated to a specific pattern. Inside RW 01:04:36.871 --> 01:04:40.972 the out the ones out there have not necessarily had that happen. 01:04:37.452 --> 01:04:37.942 OK. 01:04:42.672 --> 01:04:43.202 OK. 01:04:43.092 --> 01:04:44.925 Is there a reason we can't consolidate? I've actually 01:04:44.925 --> 01:04:47.062 always had this question to it, just never remember to ask it. 01:04:47.572 --> 01:04:50.754 I didn't wanna bother. It was something I was basically going 01:04:50.754 --> 01:04:53.782 to completely do away with when we went to Phoenix anyway. 01:04:54.452 --> 01:04:55.012 That makes sense. 01:04:55.322 --> 01:04:55.752 OK. 01:04:56.482 --> 01:04:59.266 And because the the the enum that's inside here is never 01:04:59.266 --> 01:05:01.072 referenced anywhere but inside here. 01:05:29.052 --> 01:05:30.952 Maybe I'll change that enum and Yep, you got it. 01:05:32.472 --> 01:05:34.582 And then you can take the word base off the method name. 01:05:38.832 --> 01:05:40.072 And for the uh? 01:05:41.362 --> 01:05:44.739 For a provider that's I guess supports multiple right in 01:05:44.739 --> 01:05:48.176 these, you would usually like what pass in a, a string or 01:05:48.176 --> 01:05:50.782 whatever. Have another implementation that. 01:05:51.662 --> 01:05:53.952 Allows you to pass in a string of like the name or something. 01:05:52.322 --> 01:05:52.742 Umm. 01:05:54.622 --> 01:05:57.268 The the one that passes in the string with the name was only 01:05:57.268 --> 01:05:59.828 for a very specific scenario where we needed to be able to 01:05:59.828 --> 01:06:02.430 call a particular one. You'd normally wouldn't even need to 01:06:00.822 --> 01:06:01.232 Umm. 01:06:02.430 --> 01:06:04.902 do that. You would just give back the list of providers. 01:06:03.492 --> 01:06:03.902 OK. 01:06:05.752 --> 01:06:08.823 Yes, that could be in certain specific situations where like 01:06:05.822 --> 01:06:06.862 Umm. If you want to. 01:06:08.823 --> 01:06:12.094 with payment providers, I think it was you have one that handles 01:06:09.282 --> 01:06:09.562 Yeah. 01:06:12.094 --> 01:06:14.862 certain types of payments and one that handles others. 01:06:13.982 --> 01:06:14.392 Umm. 01:06:15.822 --> 01:06:18.612 Yeah, I think I did that in bid for the thing, so. 01:06:16.582 --> 01:06:20.062 And then there was the the one for PayPal. 01:06:20.502 --> 01:06:24.350 Umm, check out provider part when normally you had like the 01:06:24.350 --> 01:06:28.583 targets order, checkout provider enabled PayPal you would call it 01:06:28.583 --> 01:06:32.558 specifically so that you could bolt on the the way the PayPal 01:06:32.558 --> 01:06:36.598 one worked and then the other one was for the import providers 01:06:36.598 --> 01:06:40.510 you would call the specific whether it was the CSV importer, 01:06:40.510 --> 01:06:43.652 the Excel importer V1 or V or Excel importer V2. 01:06:44.892 --> 01:06:45.672 That we had. 01:06:46.852 --> 01:06:49.012 Those those were the specific scenarios where we would do 01:06:49.012 --> 01:06:51.134 that. Everyone else, it was always just assumed that you 01:06:51.134 --> 01:06:53.256 were always getting back all the providers like shipping 01:06:53.256 --> 01:06:55.042 providers, you would always give them all back. 01:06:55.812 --> 01:06:56.162 Yeah. 01:07:01.212 --> 01:07:03.821 Right. And are those the only two updates I need to make in 01:07:03.821 --> 01:07:05.212 this file? Just double checking. 01:07:04.932 --> 01:07:05.812 I believe so. 01:07:07.722 --> 01:07:11.995 Because now you have everything set up to where somewhere else 01:07:11.995 --> 01:07:16.200 in the code can can and will only pull it in by interface and 01:07:16.200 --> 01:07:18.912 by dependency injection, which is nice. 01:07:24.652 --> 01:07:25.552 And then not work. 01:07:28.232 --> 01:07:30.042 I swear that never works for me. 01:07:29.712 --> 01:07:35.612 Uh, it's it's broken because you have a pound. If in the list. 01:07:36.872 --> 01:07:37.762 If you Scroll down. 01:07:40.042 --> 01:07:42.641 There's a pound if on it, and so when it does that it gets 01:07:40.132 --> 01:07:41.082 Ah. 01:07:42.641 --> 01:07:44.842 confused and doesn't want to break your pound if. 01:07:45.802 --> 01:07:48.102 So you have to cut it and paste it into the right spot. 01:07:49.082 --> 01:07:52.945 Or just alt arrow alt arrow keys to scooch it up and down also 01:07:52.945 --> 01:07:53.312 works. 01:07:54.642 --> 01:07:57.372 And then you don't necessarily need to select the content and 01:07:57.372 --> 01:08:00.189 align, just having your cursor on the line and pressing control 01:08:00.189 --> 01:08:03.006 X will cut the line and then you can paste it and it will paste 01:08:03.006 --> 01:08:04.062 the entire line for you. 01:08:05.842 --> 01:08:06.532 Got it. 01:08:07.512 --> 01:08:09.869 I actually did not know that, so if you don't have anything 01:08:09.869 --> 01:08:10.222 selected. 01:08:10.842 --> 01:08:13.072 Yeah. Control X cuts the whole line, yeah. 01:08:10.932 --> 01:08:11.962 You just have the carrot. 01:08:11.002 --> 01:08:12.002 Like right now, he's got his. 01:08:13.742 --> 01:08:14.082 Yeah. 01:08:14.142 --> 01:08:14.432 Ah. 01:08:15.242 --> 01:08:18.342 And then you can hit paste and it will paste that line in that 01:08:15.552 --> 01:08:15.772 Like. 01:08:18.342 --> 01:08:20.752 other spot above where your cursor currently is. 01:08:22.672 --> 01:08:25.252 I feel like I've been wearing blinders my whole life now. 01:08:25.642 --> 01:08:28.794 And then it's controlled D to duplicate a line and yeah, the 01:08:28.794 --> 01:08:31.997 alt up and down will switch the switch stuff. There's another 01:08:31.997 --> 01:08:35.096 hot key that will that will do like the swap. The two lines 01:08:35.096 --> 01:08:38.248 thing, but I don't remember what it is and it's probably not 01:08:38.248 --> 01:08:39.022 worth learning. 01:08:42.232 --> 01:08:44.760 I hate the C# interactive window, so I've killed the 01:08:44.760 --> 01:08:47.192 hockey and my keyboard convict to make it go away. 01:08:47.762 --> 01:08:49.412 What did you say was duplicate line? 01:08:49.972 --> 01:08:50.882 Control D. 01:08:50.222 --> 01:08:50.712 Control. 01:08:53.302 --> 01:08:54.612 I still didn't catch that. 01:08:54.602 --> 01:08:57.192 Controlled D control uh, dog. 01:08:56.162 --> 01:08:56.682 OK. 01:08:57.912 --> 01:08:59.302 Gotcha. I gotcha. 01:08:58.652 --> 01:09:02.523 Yeah. And then if you hold the alt arrow and press or the Alt 01:09:02.523 --> 01:09:06.330 key and press the up or down arrows, it'll move lines up and 01:09:06.330 --> 01:09:06.642 down. 01:09:08.022 --> 01:09:08.552 Nice. 01:09:09.022 --> 01:09:11.066 It, which is also really convenient if you just like 01:09:11.066 --> 01:09:11.952 reorganizing something. 01:09:13.622 --> 01:09:17.502 One of the things that in and especially the the next version 01:09:17.502 --> 01:09:21.631 of Seth I'm trying to do is with a lot of these name spaces where 01:09:21.631 --> 01:09:25.510 it's a common name space that's gonna be used like throughout 01:09:25.510 --> 01:09:29.514 the entire project, especially with T fours outputs. I'm trying 01:09:29.514 --> 01:09:33.268 to add those as global usings inside the csproj so that you 01:09:33.268 --> 01:09:36.709 don't have to keep adding them anymore. So like system 01:09:36.709 --> 01:09:40.463 threading tasks, system system dot collections dot generic, 01:09:40.463 --> 01:09:44.592 Jetbrains dot annotations, a lot of those very common namespaces. 01:09:44.672 --> 01:09:47.433 Would just be inside the CS project and you won't have to 01:09:47.433 --> 01:09:48.432 include them anymore. 01:09:49.652 --> 01:09:52.092 Throughout the files, they'll just be there and active. 01:09:53.142 --> 01:09:56.477 Umm, so I'll I'm I'm trying to clear a lot of that kind of junk 01:09:56.477 --> 01:09:59.708 out and we'll kind of reduce like some of the overhead inside 01:09:59.708 --> 01:10:03.095 of the files for like getting a file stood up and ready to go in 01:10:03.095 --> 01:10:04.032 a particular area. 01:10:06.982 --> 01:10:08.182 Awesome. Yeah, that would be nice. 01:10:16.242 --> 01:10:19.544 All right. So the last thing that I have would just be to 01:10:16.502 --> 01:10:16.872 Now. 01:10:19.544 --> 01:10:22.618 double check all of the documentation comments added, 01:10:22.618 --> 01:10:25.862 make sure every reference is there that it needs. If you 01:10:25.862 --> 01:10:29.220 copied them from existing providers or other methods, make 01:10:29.220 --> 01:10:31.212 sure they get updated when copied. 01:10:33.182 --> 01:10:35.862 Things that are inherited to have the inherent DOC tag on. 01:10:34.392 --> 01:10:35.512 Unused using. 01:10:37.272 --> 01:10:37.912 What was that? 01:10:38.572 --> 01:10:40.042 Remove unused usings. 01:10:40.552 --> 01:10:41.022 Yep. 01:10:42.552 --> 01:10:45.072 Go through check all the using statements and. 01:10:45.832 --> 01:10:51.066 Also, to double check the csproj file at the very end because we 01:10:51.066 --> 01:10:55.332 did add some project references and nugget packages. 01:10:56.102 --> 01:10:58.994 So you can see the post build events that were all the way at 01:10:58.994 --> 01:11:02.026 the bottom got moved up. So I'm gonna move them back down to the 01:11:02.026 --> 01:11:02.352 bottom. 01:11:04.572 --> 01:11:07.322 I will have to update spacing again. 01:11:12.462 --> 01:11:14.698 And then you said you wanted to do something with that at the 01:11:14.698 --> 01:11:14.842 end. 01:11:15.562 --> 01:11:16.592 Earlier, not sure. 01:11:17.602 --> 01:11:18.692 With the postbuild events. 01:11:17.762 --> 01:11:20.919 Yeah, I was just going to come back to it at the end to make 01:11:20.919 --> 01:11:23.972 sure everything looked clean and where was supposed to be. 01:11:24.472 --> 01:11:24.882 OK. 01:11:26.772 --> 01:11:27.602 And I did. 01:11:27.822 --> 01:11:31.445 I'll update this formatting earlier and it seems to have 01:11:31.445 --> 01:11:35.512 undid that and it's happened to me a couple times. I don't know 01:11:34.002 --> 01:11:34.232 It. 01:11:35.512 --> 01:11:36.592 why it does that. 01:11:36.132 --> 01:11:39.730 Yes, it will do that because it's automatic and be part of 01:11:39.730 --> 01:11:41.132 their thing to do that. 01:11:43.172 --> 01:11:46.191 So when you need to work on those lines to like add new 01:11:46.191 --> 01:11:49.695 ones, drop them down, make them into the new lines like that, do 01:11:49.695 --> 01:11:52.983 what you gotta do, and if it later undoes that and puts them 01:11:52.983 --> 01:11:56.324 in using those characters, it's fine. They both work the same 01:11:56.324 --> 01:11:57.402 way to the compiler. 01:11:59.452 --> 01:12:01.675 But generally speaking, this editing this isn't something 01:12:01.675 --> 01:12:02.862 you're doing very often anyway. 01:12:03.522 --> 01:12:05.802 UM for that stuff, but there you go. 01:12:07.672 --> 01:12:08.062 No. 01:12:14.772 --> 01:12:17.862 So that was pretty much all I had for the provider setup. 01:12:20.402 --> 01:12:24.410 See there? We were also going to talk a little bit about third 01:12:24.410 --> 01:12:25.872 party API integrations. 01:12:27.132 --> 01:12:30.420 Which looks like we only got about 20 minutes left. I don't 01:12:30.420 --> 01:12:32.282 have too much to say about those. 01:12:33.932 --> 01:12:38.250 I have some documentation up here for some of the ones that 01:12:38.250 --> 01:12:39.832 I've worked on before. 01:12:40.552 --> 01:12:44.393 And was just gonna talk about some of the main problems that I 01:12:44.393 --> 01:12:48.172 ran into and some of maybe like the tips and stuff that might 01:12:48.172 --> 01:12:52.012 help you solve a couple of those problems a little bit faster. 01:12:53.082 --> 01:12:56.716 Umm, but the biggest piece of advice I could give for third 01:12:56.716 --> 01:13:00.046 party integrations is to read all of the documentation 01:13:00.046 --> 01:13:03.619 beginning to end all the way through, because a lot of the 01:13:03.619 --> 01:13:07.555 times, like the National Weather Service was the very first one. 01:13:07.555 --> 01:13:11.007 I did the one that we just recreated and it's really not 01:13:11.007 --> 01:13:14.337 that long documentation. And then there's a handful of 01:13:14.337 --> 01:13:17.910 examples and then you can go through the specification and 01:13:17.910 --> 01:13:21.422 see all the different endpoints and stuff that they have. 01:13:22.332 --> 01:13:23.052 But I. 01:13:23.782 --> 01:13:28.316 Kind of read the overview and some of the more prominent 01:13:28.316 --> 01:13:28.952 details. 01:13:29.602 --> 01:13:32.910 And thought OK, I got enough to at least begin work now and then 01:13:32.910 --> 01:13:34.182 started development work. 01:13:34.852 --> 01:13:39.204 Came back and referenced this when I need to. Same with the 01:13:39.204 --> 01:13:41.452 how AI documentation and stuff. 01:13:42.412 --> 01:13:44.252 But there's always been. 01:13:45.532 --> 01:13:48.862 Pieces of information that are not super front page in your 01:13:48.862 --> 01:13:52.191 face where you're going to see. Oh, yeah, that's definitely 01:13:52.191 --> 01:13:55.243 gonna be important. I'm definitely gonna need that. It 01:13:55.243 --> 01:13:58.627 almost feels like some of the information is hidden to where 01:13:58.627 --> 01:14:01.734 it's difficult to find. So beginning to end reading the 01:14:01.734 --> 01:14:03.232 entire thing will help you. 01:14:04.152 --> 01:14:07.387 Avoid mistakes and having to spend hours later reading 01:14:07.387 --> 01:14:10.798 through the documentation in a second time trying to find 01:14:10.798 --> 01:14:14.327 things that you might have glossed over the very first time 01:14:14.327 --> 01:14:15.032 you read it. 01:14:17.782 --> 01:14:19.372 Another thing is. 01:14:20.422 --> 01:14:24.904 A lot of them will give examples on implementation for accessing 01:14:24.904 --> 01:14:26.282 endpoints or making. 01:14:27.292 --> 01:14:28.172 Web requests. 01:14:29.232 --> 01:14:33.534 These can be copy and pasted into ChatGPT if they need to be 01:14:33.534 --> 01:14:37.270 translated into another language. They give examples 01:14:37.270 --> 01:14:37.552 and. 01:14:38.242 --> 01:14:39.942 Uh, Python or something? 01:14:40.702 --> 01:14:44.900 You can use ChatGPT to just convert those into C# and copy 01:14:44.900 --> 01:14:49.383 and paste them into your actual code. And for the most part it 01:14:49.383 --> 01:14:53.865 does it very, very well and you can get a large chunk of stuff 01:14:53.865 --> 01:14:56.782 out of the way with very minimal effort. 01:14:58.202 --> 01:15:00.823 That I have done a couple of times and it's been very, very 01:15:00.823 --> 01:15:01.172 helpful. 01:15:03.902 --> 01:15:04.672 Let's see. 01:15:05.572 --> 01:15:08.242 Now this one I brought up for. 01:15:09.522 --> 01:15:14.218 Specifically, the authentication and the formats can be very 01:15:14.218 --> 01:15:18.528 finicky where like I said, the National Weather Service 01:15:18.528 --> 01:15:23.454 requires a user agent be set in the request headers when making 01:15:23.454 --> 01:15:28.226 a call to their API or it will not work and it has to be in a 01:15:28.226 --> 01:15:29.842 very specific format. 01:15:31.122 --> 01:15:34.937 These values can be obviously replaced with your contact and 01:15:34.937 --> 01:15:38.690 website name and everything, but it has to be in this exact 01:15:38.690 --> 01:15:42.254 format or the call won't fail and I made plenty of calls 01:15:42.254 --> 01:15:46.069 without this and then came back and went all the indication. 01:15:46.069 --> 01:15:50.009 Yeah, it definitely need to add that and then not in the right 01:15:50.009 --> 01:15:51.822 format and still didn't work. 01:15:52.902 --> 01:15:56.212 And same thing was the return type. 01:15:57.142 --> 01:16:02.516 This was the very first time I've seen Geo JSON in the HTTP 01:16:02.516 --> 01:16:07.800 request response type and missing this Geojson format also 01:16:07.800 --> 01:16:13.084 caused problems trying to get forecast data back from this 01:16:13.084 --> 01:16:13.442 API. 01:16:14.472 --> 01:16:17.932 So pay attention to the formats and the authentication. 01:16:19.942 --> 01:16:21.312 Was there anything else in here? 01:16:26.462 --> 01:16:30.131 I think that was it for the National Weather Service and 01:16:30.131 --> 01:16:31.032 then for Paya. 01:16:32.942 --> 01:16:36.102 What did I want to say about Paya? 01:16:43.532 --> 01:16:45.512 You don't remember what I wanted to say about this? 01:16:50.052 --> 01:16:53.686 I is documentation was really really bad. This was very hard 01:16:53.686 --> 01:16:54.102 to use. 01:16:55.642 --> 01:16:58.002 Didn't really give a ton of. 01:16:59.182 --> 01:17:03.318 Details for what was required. They do have a pretty good 01:17:03.318 --> 01:17:04.672 amount of examples. 01:17:09.012 --> 01:17:13.256 But yeah, this may seem like a lot of reading and like I don't 01:17:13.256 --> 01:17:17.096 necessarily need to read everything on this page, but it 01:17:17.096 --> 01:17:21.002 definitely helps to glance over everything at least once. 01:17:22.212 --> 01:17:25.564 Rather than just only looking at the most important things, 01:17:25.564 --> 01:17:28.860 getting the gist of it and then starting development work, 01:17:28.860 --> 01:17:32.212 you're gonna be coming back to the documentation many, many 01:17:32.212 --> 01:17:33.832 times. If you do it that way. 01:17:35.392 --> 01:17:38.587 So I would just recommend reading everything at least 01:17:38.587 --> 01:17:38.882 once. 01:17:39.742 --> 01:17:40.772 At the very start. 01:17:46.022 --> 01:17:49.262 Does anybody else have anything for third party API? 01:17:53.412 --> 01:17:56.751 There's a lot I could say, but yeah, I mean definitely if 01:17:56.751 --> 01:18:00.261 you're getting like, I don't know, my call out would be, is, 01:18:00.261 --> 01:18:03.542 sometimes you're gonna run a documentation that's either 01:18:03.542 --> 01:18:04.462 lacking or just. 01:18:05.482 --> 01:18:09.451 Everything that's useful so far, nested or even. I've seen ones 01:18:09.451 --> 01:18:13.048 where like there's three different documentation websites 01:18:13.048 --> 01:18:13.792 for one API. 01:18:14.992 --> 01:18:18.594 Or something dumb like that. Like just absolute or it's like 01:18:18.594 --> 01:18:21.782 segmented in a way that's a logical and yeah, I mean, 01:18:21.782 --> 01:18:25.560 obviously if you don't read what you need to read, you're gonna 01:18:25.560 --> 01:18:26.622 run into problems. 01:18:28.152 --> 01:18:31.331 Especially when when you're working with an API that's 01:18:31.331 --> 01:18:35.087 opinionated again, wants to set stuff like user agents, or maybe 01:18:35.087 --> 01:18:38.496 even provide checksums in a specific order or whatever, or 01:18:38.496 --> 01:18:39.362 yada yada yada. 01:18:40.372 --> 01:18:43.522 Opinionated, I've never heard of an API that was an opinionated. 01:18:40.612 --> 01:18:41.252 So. 01:18:45.452 --> 01:18:49.490 Yeah, the never, it's like this dates format in the wrong way, 01:18:49.490 --> 01:18:53.592 but I'm gonna return to generic care that you couldn't possibly 01:18:53.592 --> 01:18:57.502 debug. Yeah, it's tough. So all I would say and I don't know 01:18:57.502 --> 01:19:01.219 what what James or Brendan's thoughts are, is like if you 01:19:01.219 --> 01:19:05.064 have a 3 hour task, it's gonna take you 3 hours to read the 01:19:05.064 --> 01:19:09.166 documentation. But you know you probably need to spend at least 01:19:09.166 --> 01:19:09.422 two. 01:19:10.882 --> 01:19:14.677 You know, ask for more time because you're gonna have to do 01:19:14.677 --> 01:19:18.282 it. Like there's no way of getting around that. So yeah. 01:19:18.172 --> 01:19:21.222 Yeah, and that was a good point to. 01:19:19.562 --> 01:19:23.634 And that's that's why writing a new A a new provider, the 01:19:23.634 --> 01:19:28.267 default is usually like 12 to 16 hours on it, so you shouldn't be 01:19:28.267 --> 01:19:32.759 only giving it 3 hour tasks and expecting it to have the entire 01:19:32.759 --> 01:19:33.952 thing done on it. 01:19:35.532 --> 01:19:36.342 Yeah. 01:19:36.992 --> 01:19:37.422 That. 01:19:38.342 --> 01:19:39.282 That would be a. 01:19:39.972 --> 01:19:42.342 That would be nice. I'll say that. 01:19:43.572 --> 01:19:47.558 Yeah. And then each time you go to access that third party API 01:19:47.558 --> 01:19:51.164 gets wrapped in a try catch block and then make sure you 01:19:51.164 --> 01:19:52.682 have sufficient logging. 01:19:52.932 --> 01:19:55.362 Umm, recording in the. 01:19:56.312 --> 01:20:00.089 That's uh, that's block. So that when you do get those errors 01:20:00.089 --> 01:20:03.439 back, you have hopefully something that might help you 01:20:03.439 --> 01:20:06.972 figure out what the problem is. Because if you just start 01:20:06.972 --> 01:20:07.702 testing the. 01:20:08.772 --> 01:20:11.972 API right away and have no logging implemented at the 01:20:11.972 --> 01:20:15.824 beginning. Then you're gonna be a lot harder of a time trying to 01:20:15.824 --> 01:20:18.372 figure out whatever the other problem was. 01:20:22.742 --> 01:20:26.966 I thought this was cool, though this was not a third party, but 01:20:26.966 --> 01:20:30.992 just a Nugent package that we had to download for generating 01:20:30.992 --> 01:20:35.018 bar codes and that also had really bad documentation and did 01:20:35.018 --> 01:20:39.176 not could not find an example anywhere of it actually using it 01:20:36.892 --> 01:20:37.192 OK. 01:20:39.176 --> 01:20:43.334 to encode a barcode. It was just for decoding them was all the 01:20:43.334 --> 01:20:47.162 examples were for decoding and we need to encode barcode. 01:20:48.092 --> 01:20:51.473 But I just straight up as ChatGPT. How would I generate a 01:20:51.473 --> 01:20:54.912 bar code in C# and gave it the name of the nugget package? 01:20:55.732 --> 01:20:59.176 And pretty much could just copy and paste everything out of 01:20:59.176 --> 01:20:59.462 here. 01:21:00.142 --> 01:21:02.532 Umm. And then also it. 01:21:03.432 --> 01:21:08.739 Converted it to a base 64 string for me, which was also really 01:21:08.739 --> 01:21:13.792 nice. So again ChatGPT. Very useful tool if you need it to. 01:21:15.002 --> 01:21:16.822 To help you either read documentation. 01:21:17.362 --> 01:21:21.052 Umm, I think the ChatGPT 4.0. 01:21:22.452 --> 01:21:27.283 Or the 3.5, which is the three version, is only up to 2021 or 01:21:27.283 --> 01:21:31.412 something like that, so it might not have access to. 01:21:32.062 --> 01:21:35.114 All of the most recent documentation, but when we get 01:21:35.114 --> 01:21:35.622 that 4.0. 01:21:36.612 --> 01:21:40.880 License. It should be able to read all current documents on 01:21:40.880 --> 01:21:45.431 the web and you could just say read this documentation and show 01:21:45.431 --> 01:21:50.054 me how to make an endpoint call to this third party API and they 01:21:50.054 --> 01:21:53.112 might just write the entire thing for you. 01:21:55.082 --> 01:21:56.282 But I thought this was really good. 01:21:55.452 --> 01:21:55.762 Well. 01:21:57.872 --> 01:22:01.609 Actually I don't know if I don't know if V4 can can V4 actually 01:22:01.609 --> 01:22:04.002 read the web through opening eyes thing? 01:22:05.002 --> 01:22:09.255 I'm not sure. I thought it was able to, but I'm not entirely 01:22:09.255 --> 01:22:09.882 positive. 01:22:13.072 --> 01:22:16.522 I'll test it so I pay for it because it's that good. It's 01:22:16.522 --> 01:22:19.673 that much better. I'll be honest. In 3.5 I know some 01:22:19.673 --> 01:22:23.360 people don't think it is, but depending on what you're doing, 01:22:20.062 --> 01:22:20.492 Yeah. 01:22:23.360 --> 01:22:26.452 if you're doing something complex or very specific. 01:22:27.082 --> 01:22:31.284 You're like, hey, look like, I can't find documentation on this 01:22:31.284 --> 01:22:35.288 or whatever. It it's pretty 44 has some level of like actual 01:22:35.288 --> 01:22:39.030 reasoning, which is kind of crazy. I'll just say it that 01:22:39.030 --> 01:22:39.292 way. 01:22:42.432 --> 01:22:46.332 Yeah, and even ChatGPT 3.5 has. 01:22:47.202 --> 01:22:53.842 I think records or has learning data from up to 2021. 01:22:54.522 --> 01:22:58.151 Most positive. So if the documentation on the web is 01:22:58.151 --> 01:23:01.232 older than that, it should still be able to. 01:23:02.072 --> 01:23:04.382 To have access to information about it. 01:23:05.052 --> 01:23:08.592 I've had something like well indexed or like a generic issue 01:23:08.592 --> 01:23:12.015 like hey, I want to take an Excel doc and get these things 01:23:12.015 --> 01:23:14.742 out and blah blah or I wanna you know, I mean. 01:23:15.432 --> 01:23:18.955 Then it can usually give you a pretty good answer, but like for 01:23:18.955 --> 01:23:21.322 example for this thing I just tossed it a. 01:23:22.332 --> 01:23:26.309 Like a it it can't like a. Yeah. Even if V4 can't read the web, 01:23:26.309 --> 01:23:27.862 although there is that a. 01:23:28.572 --> 01:23:29.872 What's the other one like the? 01:23:31.012 --> 01:23:34.845 There's an open. I guess there's like some kind of branch or 01:23:34.845 --> 01:23:38.741 something that allows chat GP to chat, ChatGPT to talk to the 01:23:38.741 --> 01:23:38.992 web. 01:23:39.822 --> 01:23:42.142 And actually do its own queries and stuff. 01:23:43.092 --> 01:23:45.472 So that's an alternative I I know. 01:23:43.222 --> 01:23:43.612 OK. 01:23:47.192 --> 01:23:50.682 Think JLR mentioned when we're going over that and training. 01:23:52.192 --> 01:23:55.422 Couple weeks ago, but might have been months ago now, but. 01:23:56.992 --> 01:24:00.433 There is a version that's not super hard to set up where you 01:24:00.433 --> 01:24:04.044 can be like hey, read this web page and tell me what it says on 01:24:04.044 --> 01:24:05.002 this or whatever. 01:24:05.712 --> 01:24:06.072 Umm. 01:24:06.422 --> 01:24:08.722 Which I'll have to play around with because I actually haven't 01:24:08.722 --> 01:24:09.232 done that yet. 01:24:11.992 --> 01:24:15.802 Yeah. And I think you said something earlier about the. 01:24:17.302 --> 01:24:20.328 Post build commands and copying the DLL files because that was 01:24:20.328 --> 01:24:22.632 one of the issues I ran into with this package. 01:24:21.802 --> 01:24:22.202 Umm. 01:24:23.872 --> 01:24:28.158 And it said it could not load file or assembly and I just 01:24:28.158 --> 01:24:32.961 pasted it in here I said. How do I resolve this error and one of 01:24:32.961 --> 01:24:36.730 the answers was it was yeah project using multiple 01:24:36.730 --> 01:24:37.542 assemblies. 01:24:41.372 --> 01:24:42.332 To the room. 01:24:45.962 --> 01:24:49.589 I included in your projects output folder and sure enough 01:24:49.589 --> 01:24:53.340 when I went and checked the plugins folder it was not there 01:24:53.340 --> 01:24:54.152 and that was. 01:24:54.852 --> 01:24:58.804 Pointed me in the direction of where the issue was and I was 01:24:58.804 --> 01:25:03.080 able to just open up the CS prod file and add a new copy line and 01:25:03.080 --> 01:25:06.837 just specify the actual file names that I need to copy it 01:25:06.837 --> 01:25:09.622 over and it was all good to go after that. 01:25:11.082 --> 01:25:11.452 Yeah. 01:25:21.492 --> 01:25:23.802 Alright, anybody have any other questions? 01:25:25.862 --> 01:25:26.872 Nothing for me. 01:25:30.812 --> 01:25:31.952 The. 01:25:35.722 --> 01:25:37.922 And I'm like the worst of thinking of like things last 01:25:37.922 --> 01:25:39.442 second, we end up talking another 20. 01:25:40.082 --> 01:25:40.362 That's. 01:25:40.442 --> 01:25:43.772 That so yeah. Nothing for me today. 01:25:46.252 --> 01:25:49.676 When I said yay, the transcription thought I just 01:25:49.676 --> 01:25:50.292 said the. 01:25:51.562 --> 01:25:52.492 The. 01:25:52.312 --> 01:25:52.692 I think. 01:25:54.482 --> 01:25:55.422 Yet. 01:26:00.372 --> 01:26:03.888 Cool. We're just a few minutes short of time, so we can 01:26:03.888 --> 01:26:05.582 probably go ahead and just. 01:26:06.892 --> 01:26:10.502 Wrap it up and have a nice long weekend.