| Topic | Presenter | Summary | Duration | Tags | Quiz | Captions |
| ------------------------------------------- | ---------- | ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| Adding Custom Functions to the CEF Platform | James Gray | Part 2 in the discussion of how to add custom functionality to CEF | 1:05:51 | #DevTrainings, #FridayTrainings, #CEF | N/A | |00:00:03.470 --> 00:00:07.642 - And OK, so we had the models and we had to make sure that 00:00:07.642 --> 00:00:08.834 - the model could build. 00:00:10.020 --> 00:00:13.452 - In here and that we had all the properties on the models because 00:00:13.452 --> 00:00:16.356 - from their interfaces and just succeeded. So I think that part 00:00:16.356 --> 00:00:19.524 - done and we're going to start the mapping one, but we don't 00:00:19.524 --> 00:00:22.956 - think we ran the mapping one, so I'm going to run it now. 00:00:28.010 --> 00:00:31.862 - An I'm just getting this open so that I can go into 00:00:31.862 --> 00:00:33.467 - the folder that it's in. 00:00:36.640 --> 00:00:38.360 - And I want to open. 00:00:40.520 --> 00:00:44.258 - This thing and then I should be able to see all the changes that 00:00:44.258 --> 00:00:47.729 - it just made. OK, so here's our two new tables. They got added 00:00:47.729 --> 00:00:49.064 - as files will add those. 00:00:51.320 --> 00:00:54.037 - And you can see other stuff that got changed this brand 00:00:54.037 --> 00:00:57.001 - thing. This is the This is a bug that happens with the 00:00:57.001 --> 00:00:59.718 - mapping. Like it, it causes a problem to have. This category 00:00:59.718 --> 00:01:02.682 - is here so I haven't commented out. So this has to get 00:01:02.682 --> 00:01:05.646 - reverted. To put that back in I will eventually fix the force 00:01:05.646 --> 00:01:07.375 - that it doesn't even generate their property. 00:01:08.430 --> 00:01:09.140 - Um? 00:01:10.200 --> 00:01:14.232 - For it, so we just reverted that one change. Looks like product 00:01:14.232 --> 00:01:15.912 - had to change product product 00:01:15.912 --> 00:01:20.810 - downloads added. To there, and so this is getting it added into 00:01:20.810 --> 00:01:24.550 - like the SQL query stuff that gets into the Linq expressions 00:01:24.550 --> 00:01:28.290 - that are all super strong and Smart and powerful and awesome. 00:01:29.260 --> 00:01:29.830 - Uh. 00:01:31.500 --> 00:01:34.060 - And then the sales order mapping gotta change was the 00:01:34.060 --> 00:01:36.876 - change here. Looks like it went from light to list. I'm 00:01:36.876 --> 00:01:39.436 - going to just revert that real quick and then I'll 00:01:39.436 --> 00:01:42.252 - figure out what's what needs to be done with that later. 00:01:43.490 --> 00:01:46.831 - So as I do, those reverts, I have a couple of back files 00:01:46.831 --> 00:01:47.345 - that created. 00:01:48.600 --> 00:01:53.007 - And now is it refreshes. It's down to just kind of the changes 00:01:53.007 --> 00:01:56.736 - that was really intending adding those, adding the thing to the 00:01:56.736 --> 00:02:00.465 - product, and then the mapping gets the extra things that says 00:02:00.465 --> 00:02:04.194 - the to generate the SQL. The default SQL for those things. 00:02:04.990 --> 00:02:08.864 - Then the mapping layer and then of course adds the two files to 00:02:08.864 --> 00:02:10.056 - the project file itself. 00:02:13.080 --> 00:02:17.670 - Now, having said that, the product itself does have a 00:02:17.670 --> 00:02:19.506 - custom mapper on it. 00:02:20.410 --> 00:02:23.910 - And as a custom Apparate needs to know how to map that stuff in 00:02:23.910 --> 00:02:26.110 - here this way. Now. 00:02:26.760 --> 00:02:30.127 - If this was some other thing, like if it was trying to add 00:02:30.127 --> 00:02:33.753 - like you know, like like if we were to add on the price thing 00:02:33.753 --> 00:02:36.861 - or something like that. We go into these Maps in this file 00:02:36.861 --> 00:02:39.451 - here for the product mapper and we would individually update 00:02:39.451 --> 00:02:45.060 - each of them. To make sure that they were all including this new 00:02:45.060 --> 00:02:48.974 - stuff. Um, this product downloads that we're trying to 00:02:48.974 --> 00:02:53.693 - do is supposed to be a thing that the customer supposed to be 00:02:53.693 --> 00:02:58.049 - able to have access to after they've purchased it, so I don't 00:02:58.049 --> 00:03:02.042 - really want this information going out over the wire all over 00:03:02.042 --> 00:03:06.398 - the place. If the person hasn't done that yet. Hasn't bought the 00:03:06.398 --> 00:03:11.117 - download, so I'm not going to add it to the main stuff here. 00:03:11.950 --> 00:03:12.370 - Uh. 00:03:14.330 --> 00:03:19.860 - So I am not just like here's the full map selector which goes on 00:03:19.860 --> 00:03:25.422 - to. This. And so I would have ordinarily added, 00:03:25.422 --> 00:03:29.182 - like product downloads to this part, but I'm specifically not 00:03:29.182 --> 00:03:31.438 - going to do that with this. 00:03:32.110 --> 00:03:35.232 - So I'm actually not going to map it in here, but if I were, 00:03:35.232 --> 00:03:38.354 - this is what I would do is I would go through this file. I 00:03:38.354 --> 00:03:41.030 - would find the appropriate spot and then I would go at it. 00:03:42.100 --> 00:03:45.090 - To the mappings that are relevant inside this stuff, I 00:03:45.090 --> 00:03:48.678 - would follow this thing over to like places like here and Adam 00:03:48.678 --> 00:03:51.967 - into that. And you know the product catalog item like I 00:03:51.967 --> 00:03:56.153 - would come in here and I would fill this stuff if I if I 00:03:56.153 --> 00:03:57.947 - thought that it was relevant to 00:03:57.947 --> 00:04:02.186 - these Maps. And get 'em all in there, but I do not in this 00:04:02.186 --> 00:04:03.614 - case, so I'm leaving it off. 00:04:05.960 --> 00:04:08.550 - There's this product simplified mapper, same thing if it was 00:04:08.550 --> 00:04:12.176 - relevant to this I would put it on this, but I'm not going to 00:04:12.176 --> 00:04:13.730 - 'cause it's not in this case. 00:04:14.580 --> 00:04:15.420 - Um? 00:04:17.030 --> 00:04:19.538 - And I think actually. 00:04:20.750 --> 00:04:23.805 - For the moment we go in and I would change some of that 00:04:23.805 --> 00:04:26.625 - thing in here and maybe make it so that some of this 00:04:26.625 --> 00:04:29.210 - doesn't get mapped onto this thing too, but I'll see if 00:04:29.210 --> 00:04:32.265 - what ends up over the wire or not before I go editing the 00:04:32.265 --> 00:04:32.500 - T4. 00:04:33.940 --> 00:04:35.896 - So I'm going to close all this stuff out and I'm going 00:04:35.896 --> 00:04:37.200 - to make sure that the mapping project built. 00:04:50.210 --> 00:04:52.770 - Alright, so that's one succeeded. Yep, it built OK, so 00:04:52.770 --> 00:04:56.098 - the next one we want to build is the workflows workflows we need 00:04:56.098 --> 00:04:57.634 - to run these two T fours. 00:05:00.270 --> 00:05:01.700 - So I'll run that one. 00:05:05.620 --> 00:05:07.160 - And then I will run. 00:05:09.920 --> 00:05:10.730 - This one. 00:05:25.750 --> 00:05:28.126 - K and then if I open this file is probably going to 00:05:28.126 --> 00:05:28.720 - be satisfied now. 00:05:30.650 --> 00:05:31.958 - Where it wasn't before. 00:05:32.700 --> 00:05:37.900 - Yeah, OK, so my error list here reduces in issues. 00:05:39.620 --> 00:05:40.240 - This. 00:05:41.430 --> 00:05:44.640 - It's often and this is there then that's fine, OK. 00:05:45.700 --> 00:05:50.094 - So let's just quickly build this and see what the changes are as 00:05:50.094 --> 00:05:52.160 - well. Looking over here. 00:05:58.940 --> 00:06:03.580 - OK, so it added associate workflows and workflows and the 00:06:03.580 --> 00:06:05.436 - type and type workflows. 00:06:06.300 --> 00:06:08.470 - Files from the T fours. 00:06:09.690 --> 00:06:11.090 - And I can open that real quick 00:06:11.090 --> 00:06:14.382 - and could see like. The product download itself doesn't have any 00:06:14.382 --> 00:06:17.042 - associate workflow, so it just created a file that basically 00:06:17.042 --> 00:06:18.638 - said there were none in there. 00:06:20.700 --> 00:06:24.417 - And the workflow itself, let's get to the yellows 00:06:24.417 --> 00:06:26.069 - class with seizure read. 00:06:27.280 --> 00:06:30.500 - It created like the product download workflow which is an 00:06:30.500 --> 00:06:34.364 - inheriting. The name obeys, it passes in a liquid, types to it 00:06:34.364 --> 00:06:37.584 - and then you also uses the download workflow interface and 00:06:37.584 --> 00:06:40.804 - then generate some default stuff in here that usually doesn't 00:06:40.804 --> 00:06:45.312 - need to be messed with on its own and as well as like some 00:06:45.312 --> 00:06:49.176 - relate workflows that go in and do this stuff. I want to 00:06:49.176 --> 00:06:53.040 - eventually get more of this into an interface that could be done 00:06:53.040 --> 00:06:54.650 - to generate as much code. 00:06:55.640 --> 00:06:58.750 - But some of that stuff because it's referencing it by 00:06:58.750 --> 00:07:01.549 - individual property names. It's not something that's very easy 00:07:01.549 --> 00:07:05.592 - to just swap out unless I write a bunch of like get functions 00:07:05.592 --> 00:07:08.702 - and set functions manually and dynamically, which gets a little 00:07:08.702 --> 00:07:11.495 - annoying. And I'm wondering, I'm worried about the 00:07:11.495 --> 00:07:14.145 - performance, so I haven't bothered to do some of that 00:07:14.145 --> 00:07:17.325 - extra work, but we have these two extra things here, so we 00:07:17.325 --> 00:07:19.975 - have an associate Anna Workflow for each of the two 00:07:19.975 --> 00:07:22.890 - tables that the total of four files the workflows file gets 00:07:22.890 --> 00:07:24.480 - these two extra things into here. 00:07:25.700 --> 00:07:29.180 - And the Association workflows gets those gets that one there 00:07:29.180 --> 00:07:32.660 - because there's only one that was actually generated for that 00:07:32.660 --> 00:07:35.444 - one, because the other one doesn't have one. 00:07:36.320 --> 00:07:37.100 - To do. 00:07:38.310 --> 00:07:41.731 - There were no other changes on that stuff besides the product 00:07:41.731 --> 00:07:45.152 - getting, you know, adding and the thing that says that it 00:07:45.152 --> 00:07:47.640 - should go reference the product downloads if product 00:07:47.640 --> 00:07:50.439 - delivering set when you're saving the product, either by 00:07:50.439 --> 00:07:54.171 - creating it or updating it, then it should go in and call 00:07:54.171 --> 00:07:56.970 - its associate Workflow and the Associate Workflow got added 00:07:56.970 --> 00:08:00.702 - to it. So here's its baseline that says how to create the 00:08:00.702 --> 00:08:03.812 - type and some of those other pieces inside there, but 00:08:03.812 --> 00:08:05.678 - there's more we're going to do. 00:08:07.530 --> 00:08:11.058 - So those pieces are there and now what we need to do? 00:08:11.790 --> 00:08:15.178 - Is first let's go over to the Association workflows. Let's add 00:08:15.178 --> 00:08:16.718 - one for our product download. 00:08:17.450 --> 00:08:19.892 - I'm going to copy the categories 00:08:19.892 --> 00:08:22.286 - one. Because that's what I feel like doing. 00:08:23.450 --> 00:08:25.474 - So I have a space to work with. 00:08:26.890 --> 00:08:29.648 - Span it's gonna be product product downloads. 00:08:31.640 --> 00:08:32.030 - What? 00:08:33.090 --> 00:08:33.969 - Spell it correctly. 00:08:36.380 --> 00:08:38.048 - Hey, I can't see what's down 00:08:38.048 --> 00:08:42.950 - the. Thing, so let's do that and then instead of. 00:08:43.640 --> 00:08:47.112 - Categories I want. Product 00:08:47.112 --> 00:08:50.650 - downloads. And again, I should spell Kirby. 00:08:52.300 --> 00:08:53.389 - Match the case. 00:08:56.200 --> 00:08:58.730 - Now what are the padlock is? I don't need that, I 00:08:58.730 --> 00:08:59.880 - know I don't need that. 00:09:02.470 --> 00:09:05.099 - And there's some other stuff in here we have changed, like 00:09:05.099 --> 00:09:06.294 - heartache. This date piece off. 00:09:07.450 --> 00:09:09.300 - Downloads. 00:09:10.330 --> 00:09:13.660 - Uh, we know that it's partial and it's doing the 00:09:13.660 --> 00:09:15.658 - partial correctly the category category model. 00:09:17.130 --> 00:09:19.418 - We can say is. 00:09:21.700 --> 00:09:26.903 - Product download singular I should fix a bunch of these or 00:09:26.903 --> 00:09:29.268 - make them worse, who knows? 00:09:30.340 --> 00:09:30.900 - Uh. 00:09:33.390 --> 00:09:35.000 - No suitable method to override. 00:09:36.130 --> 00:09:37.630 - Ah, OK. 00:09:40.130 --> 00:09:41.994 - So let's go over to the other one. 00:09:43.740 --> 00:09:45.468 - Looks like this is not the 00:09:45.468 --> 00:09:48.560 - correct name. Well, we know what the correct name is 00:09:48.560 --> 00:09:49.940 - going to be from over here. 00:09:56.090 --> 00:09:57.298 - OK, there we go. 00:09:58.530 --> 00:09:59.846 - That was what I messed up and 00:09:59.846 --> 00:10:00.770 - now. Oh, it's understanding some 00:10:00.770 --> 00:10:03.330 - of the stuff a little better. OK. 00:10:04.560 --> 00:10:09.498 - So. We need to start matching data to find out things that 00:10:09.498 --> 00:10:10.530 - need to be changed. 00:10:11.320 --> 00:10:14.236 - So we start grabbing properties from it and say. 00:10:15.120 --> 00:10:15.960 - Um? 00:10:17.340 --> 00:10:20.040 - Stuff like that that is actually supposed to be 00:10:20.040 --> 00:10:21.540 - over here in the compare. 00:10:23.200 --> 00:10:26.049 - Because I started doing the wrong thing here. OK, so it 00:10:26.049 --> 00:10:27.085 - needs to have a. 00:10:28.030 --> 00:10:30.628 - A product ID. 00:10:34.900 --> 00:10:39.300 - Or a product dot ID and it needs to have or it needs to have a 00:10:39.300 --> 00:10:42.600 - key. So basically we need to have something that we can match 00:10:42.600 --> 00:10:45.070 - the product against. Uh. 00:10:46.760 --> 00:10:50.225 - Download this config. It was only relevant categories so 00:10:50.225 --> 00:10:52.150 - we're not worried about that. 00:10:52.970 --> 00:10:54.846 - And again, we're not worried about that. 00:10:57.210 --> 00:10:58.500 - So we're going to take those 00:10:58.500 --> 00:11:01.407 - guys and do that. OK, so this gives us like we 00:11:01.407 --> 00:11:03.306 - have to have something to match the product by. 00:11:04.390 --> 00:11:06.370 - And we might actually have. 00:11:07.400 --> 00:11:09.480 - I'm gonna check this here. Model that product SCO URL. 00:11:09.480 --> 00:11:12.600 - Yes, we do have that so we can do it. Any key valid key here? 00:11:15.830 --> 00:11:19.610 - So if any one of these values are there, then we know that we 00:11:19.610 --> 00:11:23.120 - have something that we can try and match a product by and that 00:11:23.120 --> 00:11:26.630 - would mean that this this object is going to be valid in that 00:11:26.630 --> 00:11:30.943 - respect. Now we also need to know that this is going to 00:11:30.943 --> 00:11:33.760 - download. There has to be something about the download 00:11:33.760 --> 00:11:37.829 - itself that would be valid too, so we're going to add a check 00:11:37.829 --> 00:11:42.211 - for that, so it's going to be all that, and it's got to have 00:11:42.211 --> 00:11:45.028 - something else that's valid about the download itself, so 00:11:45.028 --> 00:11:48.784 - we're going to say it has to have either an absolute or 00:11:48.784 --> 00:11:53.000 - relative URL. To it, and that it has to have a type. 00:11:54.270 --> 00:11:58.911 - So let's put stuff in there, so there's going to be an absolute 00:11:58.911 --> 00:12:00.696 - URL model dot relative URL. 00:12:02.460 --> 00:12:04.682 - And actually, we can do this specifically, like if it says 00:12:04.682 --> 00:12:07.308 - that it's one way or the other, it has to be one or 00:12:07.308 --> 00:12:07.914 - the other functional. 00:12:11.180 --> 00:12:14.588 - And I apologize that typing this out a little weird because of 00:12:14.588 --> 00:12:16.292 - what I'm doing with it, but. 00:12:19.950 --> 00:12:20.710 - Uh. 00:12:22.280 --> 00:12:22.770 - OK. 00:12:24.850 --> 00:12:27.950 - Contractor check valid key. 00:12:28.830 --> 00:12:33.690 - This is just string as string is not string, is null or 00:12:33.690 --> 00:12:36.408 - whitespace. Check on the key. 00:12:37.040 --> 00:12:39.242 - And if it's model dot is 00:12:39.242 --> 00:12:45.228 - absolute URL. That or the model is not an absolute 00:12:45.228 --> 00:12:50.187 - URL and contract dot check valid key relative URL. 00:12:51.900 --> 00:12:52.748 - So we do that. 00:12:53.910 --> 00:12:56.275 - And then that basically left me with an extra vertices here. 00:12:58.640 --> 00:13:02.824 - So basically it says recognize the product by. 00:13:04.150 --> 00:13:07.519 - And then. Must have a. 00:13:08.540 --> 00:13:09.890 - Allergy URL 00:13:12.440 --> 00:13:15.180 - either absolute or relative. 00:13:16.530 --> 00:13:18.749 - OK, and then the next check we 00:13:18.749 --> 00:13:21.530 - would add is. Must have a type. 00:13:25.480 --> 00:13:28.540 - And contract at check. 00:13:30.260 --> 00:13:32.760 - Ah, any valid ID. 00:13:33.500 --> 00:13:35.187 - So we'll save model at type ID. 00:13:36.330 --> 00:13:41.569 - And model dot type question mark so it could be coming out either 00:13:41.569 --> 00:13:43.987 - either one of those two places. 00:13:44.880 --> 00:13:48.585 - And there's an order here, and it's going to be kind of like 00:13:48.585 --> 00:13:52.005 - this stuff here, so I'm just going to grab these and throw 00:13:52.005 --> 00:13:53.715 - them on this. And then we'll 00:13:53.715 --> 00:13:57.410 - have a big. Parentheses on this for order of operations, and 00:13:57.410 --> 00:14:01.050 - I'll indent that so that if we it's more clear that it's inside 00:14:01.050 --> 00:14:04.096 - that piece. And then I'll take the word type and throw 00:14:04.096 --> 00:14:05.116 - it on these two spots. 00:14:07.230 --> 00:14:09.826 - OK, so this means that there has to have been something 00:14:09.826 --> 00:14:12.894 - that we can match the type by and types also have a display 00:14:12.894 --> 00:14:14.310 - name that we can check with. 00:14:18.410 --> 00:14:18.910 - So. 00:14:21.070 --> 00:14:25.054 - So there has to be a type. Either buy it recognizable by 00:14:25.054 --> 00:14:29.702 - its ID, but it's key name or its display name, and that value can 00:14:29.702 --> 00:14:31.362 - either come from either the. 00:14:32.280 --> 00:14:35.976 - Flat and property or the objects property. Now technically we can 00:14:35.976 --> 00:14:37.992 - actually put all these onto one 00:14:37.992 --> 00:14:42.203 - stop here. So that we can reduce the number of things that are 00:14:42.203 --> 00:14:43.518 - like actual calls out the 00:14:43.518 --> 00:14:45.890 - contract, etc. So we can do 00:14:45.890 --> 00:14:50.480 - this. And because it's so many lines here, let's do a chop. 00:14:51.500 --> 00:14:54.440 - The long line so that they're all nice and long here, and 00:14:54.440 --> 00:14:56.400 - similarly, this stuff could do the same thing. 00:14:58.420 --> 00:15:00.892 - 'cause it's basically in order that any of this stuff is valid. 00:15:04.420 --> 00:15:07.115 - And then I'm gonna do this and intended one. And then 00:15:07.115 --> 00:15:08.340 - I'm going to chop it. 00:15:11.290 --> 00:15:14.601 - Which just puts it all nice and long and meat altogether. 00:15:17.020 --> 00:15:17.690 - OK. 00:15:19.380 --> 00:15:21.690 - And if I wanted to be weird about it like I could do this 00:15:21.690 --> 00:15:23.670 - so that it's like in all the question marks are lined up 00:15:23.670 --> 00:15:24.495 - together and stuff like that. 00:15:26.010 --> 00:15:29.871 - Not really necessary, but I think you can do OK, so we now 00:15:29.871 --> 00:15:33.732 - know that our model should be valid if it meets all of these 00:15:33.732 --> 00:15:37.061 - conditions. And we have comments that are directing like what 00:15:37.061 --> 00:15:40.169 - those valid things would be. So it's clear to the next person 00:15:40.169 --> 00:15:42.759 - who's coming in to read. This knows what to do. 00:15:43.680 --> 00:15:49.260 - OK, so that said We need to match the object with the 00:15:49.260 --> 00:15:51.580 - original object. Uh. 00:15:52.540 --> 00:15:56.648 - So we're going to do some stuff in here. That's a little weird 00:15:56.648 --> 00:15:59.808 - compared to what's there. For instance, we're going to say. 00:16:00.480 --> 00:16:01.480 - Does. 00:16:02.810 --> 00:16:04.550 - The Magic Flute URL match. 00:16:05.150 --> 00:16:06.634 - If it was the same or not. 00:16:07.190 --> 00:16:11.068 - OK, it does. The relative URL match. 00:16:12.560 --> 00:16:15.675 - Or not, does the flag that said 00:16:15.675 --> 00:16:19.514 - oops. That it is an absolute URL 00:16:19.514 --> 00:16:21.690 - match. Or not. 00:16:22.760 --> 00:16:25.320 - This is how it's detecting. If something is actually changed. 00:16:27.610 --> 00:16:31.474 - So I want to the Boolean check if we got a couple of string 00:16:31.474 --> 00:16:34.786 - checks then it's gotta check the type ID stuff. Looks like I 00:16:34.786 --> 00:16:37.546 - don't have a thing down there that does that further. 00:16:37.546 --> 00:16:39.478 - Basically what we need to do is. 00:16:41.090 --> 00:16:42.530 - Var type I. 00:16:43.440 --> 00:16:48.500 - Type ID equal to workflows. 00:16:50.350 --> 00:16:56.350 - Dot product I'm sorry. Don't value dot product download types 00:16:56.350 --> 00:16:59.350 - dot resolve with auto generates. 00:17:00.620 --> 00:17:02.348 - Two ID async. 00:17:04.270 --> 00:17:07.342 - If we do this, which I will actually leave it on, that 00:17:07.342 --> 00:17:08.110 - other one there. 00:17:09.280 --> 00:17:13.084 - Do you wanna wait and Andy configure await false so that we 00:17:13.084 --> 00:17:14.669 - have that stuff on there 00:17:14.669 --> 00:17:16.600 - started? That goes for new line 00:17:16.600 --> 00:17:19.946 - that goes to new line. I press the button and it 00:17:19.946 --> 00:17:22.658 - popped that thing up. This is not what I wanted to do. 00:17:25.600 --> 00:17:29.331 - Ah, OK, now I have my parameters up so when you press control 00:17:29.331 --> 00:17:32.775 - shift space, this is what it should have popped up the teams 00:17:32.775 --> 00:17:34.880 - window overrode it. OK. 00:17:35.850 --> 00:17:37.230 - So I have.00:17:40.070 --> 00:17:42.510 - Model dot type ID. 00:17:44.660 --> 00:17:45.840 - Model dot. 00:17:47.780 --> 00:17:48.820 - Type key 00:17:50.080 --> 00:17:51.508 - not type type key. 00:17:53.120 --> 00:17:59.132 - Model dot type name model dot type display name. 00:18:00.370 --> 00:18:02.308 - Model dot type. 00:18:03.280 --> 00:18:06.440 - Uh, the context of that we're working in. 00:18:08.770 --> 00:18:13.281 - Uh, which this function does not have an. It does not have the 00:18:13.281 --> 00:18:15.016 - other piece on it either. 00:18:16.040 --> 00:18:18.800 - So I might need to do a change to make this actually 00:18:18.800 --> 00:18:20.870 - function the way that I want the function now. 00:18:22.660 --> 00:18:23.310 - OK. 00:18:24.600 --> 00:18:26.220 - So that said. 00:18:28.100 --> 00:18:29.448 - I gotta do this. 00:18:30.850 --> 00:18:34.594 - And this is also not anything function. So now I'm going to do 00:18:34.594 --> 00:18:39.820 - something really weird. OK, I'm going to make this an async. 00:18:40.510 --> 00:18:41.870 - Task cool. 00:18:42.990 --> 00:18:44.020 - Additional checks. 00:18:45.550 --> 00:18:46.780 - And we're going to add. 00:18:48.280 --> 00:18:51.008 - I clarity cars, entities, 00:18:51.008 --> 00:18:52.950 - contexts. To it. 00:18:55.280 --> 00:18:56.900 - Which makes this part happy. 00:18:57.980 --> 00:19:01.352 - But now breaks the part that this comes from, so we're going 00:19:01.352 --> 00:19:05.005 - to do a base symbol on this, and we're going to change. Find 00:19:05.005 --> 00:19:06.129 - that other function name. 00:19:07.420 --> 00:19:10.804 - Object model with additional checks. Which is This guy? 00:19:11.370 --> 00:19:12.378 - We're going to say. 00:19:14.060 --> 00:19:14.900 - Task. 00:19:16.320 --> 00:19:19.992 - I'm gonna say Async and then because it's not a little bit 00:19:19.992 --> 00:19:23.970 - longer. I wanna do that and I'm going to say asked from results. 00:19:26.270 --> 00:19:28.349 - So that the default one knows what they do. 00:19:29.600 --> 00:19:31.520 - And then that's going to break a whole bunch of other files, 00:19:31.520 --> 00:19:33.920 - but I will go back and I will do like a mass change on that. 00:19:37.780 --> 00:19:42.156 - And the thing that's calling that is where? 00:19:47.080 --> 00:19:48.250 - Patrick, did you have a question? 00:19:51.820 --> 00:19:54.724 - Yes, James can you zoom in a little bit please for the 00:19:54.724 --> 00:19:56.350 - recording. Thank you. 00:20:00.760 --> 00:20:01.600 - OK. 00:20:03.400 --> 00:20:04.040 - Uh. 00:20:07.360 --> 00:20:10.286 - We're going to do here is find 00:20:10.286 --> 00:20:13.758 - usages. Or rather, I would have to find usages against 00:20:13.758 --> 00:20:14.302 - the original. 00:20:15.370 --> 00:20:17.160 - So I'm gonna do this. 00:20:20.050 --> 00:20:22.090 - Now find usages on this. 00:20:24.360 --> 00:20:28.224 - Which is going to pop it out there and now I can see there's 00:20:28.224 --> 00:20:31.812 - 251 items in T fours, and there's one that's not in a T4. 00:20:32.940 --> 00:20:36.580 - So I definitely have to edit my T4 to do a change here, and 00:20:36.580 --> 00:20:39.440 - that's going to change an override there. OK, so I know 00:20:39.440 --> 00:20:41.000 - what I need to change their. 00:20:41.790 --> 00:20:45.178 - Now and I will put that back. 00:20:53.320 --> 00:20:55.090 - Case you wanna do that? 00:20:59.390 --> 00:21:05.380 - And this one here is going to do async task. 00:21:07.790 --> 00:21:10.166 - Is it good? Thing is you could show you like hey, 00:21:10.166 --> 00:21:11.894 - there's times when you actually change the default 00:21:11.894 --> 00:21:13.622 - or make it do stuff that we want. 00:21:19.120 --> 00:21:23.040 - And basically I will wait that now. 00:21:31.490 --> 00:21:34.127 - Hey, it's having problems overriding what the base would 00:21:34.127 --> 00:21:36.471 - be on this, but I'm going to go 00:21:36.471 --> 00:21:39.270 - teach it. But that is properly. 00:21:41.400 --> 00:21:43.220 - Sure. 00:21:46.870 --> 00:21:48.406 - Why do you not know what? 00:21:50.240 --> 00:21:50.980 - That is. 00:21:53.520 --> 00:21:54.936 - But you do know what that is, OK? 00:21:56.230 --> 00:21:59.840 - So let's do. Let's try and do T4 edit now. 00:22:05.070 --> 00:22:07.542 - Does it have a TT include it does, which means that we're 00:22:07.542 --> 00:22:10.220 - looking for is not going to be in this file so close that. 00:22:10.830 --> 00:22:12.078 - Open this one. 00:22:13.020 --> 00:22:15.945 - OK, and we know that this needs to be in a sync 2. 00:22:16.770 --> 00:22:20.634 - In order to view async inside of async so we do that. 00:22:22.390 --> 00:22:24.022 - That's wonderfully long, so 00:22:24.022 --> 00:22:26.280 - whatever. Wait? 00:22:27.420 --> 00:22:30.340 - He think, and we have to add the configure weights. 00:22:37.860 --> 00:22:40.170 - K nowhere else inside this file, so I'm going to save 00:22:40.170 --> 00:22:42.270 - this file and I'm going to run the T4 again. 00:22:45.040 --> 00:22:48.304 - And that should fix a lot of errors that would now be 00:22:48.304 --> 00:22:48.848 - getting made. 00:22:50.060 --> 00:22:53.895 - And I can go look at this file here and see what's got 00:22:53.895 --> 00:22:54.485 - problems still. 00:22:59.950 --> 00:23:04.710 - K it's doesn't know what's override with this. 00:23:05.800 --> 00:23:11.168 - The cat will stay where I was, go to the Sky. 00:23:12.930 --> 00:23:14.848 - And this guy is supposed to be 00:23:14.848 --> 00:23:17.135 - async now. This would be a task 00:23:17.135 --> 00:23:19.430 - Bool. Let's say a sink. 00:23:25.680 --> 00:23:29.380 - And the overriding this supposed to say I clarity becomes 00:23:29.380 --> 00:23:32.373 - entities context. And we need to use my hand. 00:23:32.373 --> 00:23:33.766 - Anything that will automatically add the pram 00:23:33.766 --> 00:23:33.965 - check. 00:23:35.540 --> 00:23:37.088 - And I'm guessing. 00:23:37.670 --> 00:23:39.455 - We need to pass in the context 00:23:39.455 --> 00:23:42.290 - from this guy. So let's. 00:23:42.900 --> 00:23:44.755 - Out of context to that guy too. 00:23:46.910 --> 00:23:49.358 - Which changed how this one interacts. 00:23:50.890 --> 00:23:55.370 - And this is already an async, so we can do in a wait here. 00:23:57.560 --> 00:23:59.240 - Then we can pass in the context 00:23:59.240 --> 00:24:01.960 - that we were using. To it. 00:24:03.490 --> 00:24:06.328 - So the part that's passing it in, calling it into that 00:24:06.328 --> 00:24:07.102 - stuff is good. 00:24:08.360 --> 00:24:08.960 - Uh. 00:24:10.120 --> 00:24:13.864 - I'm gonna go back to the T4 GT include and just double 00:24:13.864 --> 00:24:14.488 - check that. 00:24:16.370 --> 00:24:17.430 - That's all correct. Yep, that's 00:24:17.430 --> 00:24:20.480 - what I wanted. So let's go back here. 00:24:21.620 --> 00:24:24.260 - And run it again just to be sure that we're clear. 00:24:30.230 --> 00:24:32.639 - OK, I'm going to find out what it's complaining about. What 00:24:32.639 --> 00:24:33.515 - is it complaining about? 00:24:36.640 --> 00:24:37.600 - Uh. 00:24:39.180 --> 00:24:42.510 - There's not implement inherited thingy. 00:24:45.300 --> 00:24:46.686 - Because I need to add the context to it. 00:24:48.540 --> 00:24:49.210 - OK. 00:24:50.900 --> 00:24:57.350 - So I need to go down to the end here and say I clarity E 00:24:57.350 --> 00:24:58.640 - Commerce entities context. 00:24:59.420 --> 00:25:01.460 - We're heading Docs and everything started about that 00:25:01.460 --> 00:25:04.265 - too much, so save that and I'll run the T4 again. 00:25:10.310 --> 00:25:12.126 - It should be much happier now, I hope. 00:25:22.350 --> 00:25:23.638 - Seems a little happier. 00:25:24.200 --> 00:25:28.919 - OK, this guy has to add the context. Push that in my T4. 00:25:34.040 --> 00:25:35.810 - So save that 24 again. 00:25:43.770 --> 00:25:45.576 - That's fine, I want this is. 00:25:49.230 --> 00:25:50.930 - OK, let me process. 00:25:52.200 --> 00:25:52.910 - Much heavier. 00:25:54.410 --> 00:25:57.317 - Still don't know why it's thinking it doesn't know 00:25:57.317 --> 00:26:00.224 - what that is mean by Resharper Cache is corrupt. 00:26:01.780 --> 00:26:04.940 - Yeah, that should just be a correction to my receiver. 00:26:04.940 --> 00:26:08.416 - Yes, I'm going to do a quick Bill of this project. 00:26:10.520 --> 00:26:12.830 - See how bad it is right now. 00:26:19.440 --> 00:26:22.157 - And I'm going to call this out because this part is all just 00:26:22.157 --> 00:26:22.993 - whining about stuff that. 00:26:24.650 --> 00:26:26.120 - My mess within a minute. 00:26:29.780 --> 00:26:31.070 - OK, so we got some stuff. 00:26:31.770 --> 00:26:35.163 - Elsewhere, OK, so like for instance. These guys all 00:26:35.163 --> 00:26:38.179 - need to get updated manually. There's 121 of 00:26:38.179 --> 00:26:40.441 - them, so let's try doing a. 00:26:41.960 --> 00:26:43.440 - Grab this. 00:26:46.930 --> 00:26:48.898 - This will get me a chunk of my 00:26:48.898 --> 00:26:51.840 - stuff taken care of. Thank you this. 00:26:54.770 --> 00:26:58.370 - Not the entire solution. I want to the current projects an I 00:26:58.370 --> 00:26:59.870 - just care about CS vitals. 00:27:00.880 --> 00:27:02.290 - So replace all. 00:27:19.600 --> 00:27:20.698 - Do do do. 00:27:21.850 --> 00:27:23.796 - It's taking its sweet time doing this. 00:27:42.450 --> 00:27:43.940 - 96 occurrences. 00:27:48.750 --> 00:27:49.460 - K. 00:27:50.880 --> 00:27:53.016 - Now I know that it's still not happy. 00:27:55.090 --> 00:27:55.790 - I'm. 00:27:57.120 --> 00:27:58.200 - Close that tab. 00:28:00.390 --> 00:28:03.402 - And I'm gonna build again to find out the change 'cause of 00:28:03.402 --> 00:28:06.414 - the next error that should have is basically that all of these 00:28:06.414 --> 00:28:08.649 - are missing the. That this part. 00:28:10.630 --> 00:28:11.110 - There. 00:28:22.510 --> 00:28:25.066 - And basically we had to go through and do all of this. 00:28:26.920 --> 00:28:30.473 - I could make a regex that's smart enough to do this. 00:28:32.320 --> 00:28:33.550 - In fact, I will do that. 00:28:35.850 --> 00:28:38.538 - So you guys can see me doing a replace all of the 00:28:38.538 --> 00:28:40.778 - regex which can make some of that stuff really handy. 00:28:40.778 --> 00:28:43.690 - So let's do a control or I need to do control H first. 00:28:45.330 --> 00:28:47.574 - It's going to take the full width. We're going to do this. 00:28:48.290 --> 00:28:49.598 - We know that. 00:28:50.590 --> 00:28:52.486 - They all say this name now. 00:28:53.780 --> 00:28:56.204 - We don't know if there's going to be lines in there or 00:28:56.204 --> 00:28:58.628 - anything like that, so we just need to look for white space. 00:28:59.720 --> 00:29:02.884 - And drop that stuff off and we want to make sure that there is 00:29:02.884 --> 00:29:04.240 - white space on what we drop 00:29:04.240 --> 00:29:08.040 - afterward. And white space needs to be that long. 00:29:13.050 --> 00:29:15.150 - And there would be another one. 00:29:16.330 --> 00:29:20.626 - And then there would be one more with eye clarity E Commerce. 00:29:21.180 --> 00:29:23.455 - Cheese context in the closing 00:29:23.455 --> 00:29:26.480 - pertussis. This is gonna have. 00:29:28.080 --> 00:29:29.220 - Like that? 00:29:30.770 --> 00:29:32.228 - There's gonna be. 00:29:38.590 --> 00:29:40.648 - I probably need to do that. 00:29:46.680 --> 00:29:48.858 - What is it not liking here? 00:29:49.780 --> 00:29:53.524 - Oh, because of the stuff there. So just like a dot plus here. 00:29:54.930 --> 00:29:57.900 - Nope, doesn't work. OK, let's try. 00:29:59.250 --> 00:29:59.680 - In 00:30:01.030 --> 00:30:04.326 - Uh, I guess plus or other space plus. 00:30:05.590 --> 00:30:07.640 - I I. 00:30:09.150 --> 00:30:15.270 - When you need identifier info, so 8C AAZ is E09 plus there 00:30:15.270 --> 00:30:20.370 - shouldn't be any numbers though, so let's just do that. 00:30:22.690 --> 00:30:26.098 - Model model comma. 00:30:27.410 --> 00:30:30.710 - Waqar weigh in Space Plus. 00:30:32.000 --> 00:30:32.610 - Uh. 00:30:34.870 --> 00:30:37.838 - May not be the same values, I can't do the same one here. It's 00:30:37.838 --> 00:30:38.898 - going to be an eye. 00:30:39.640 --> 00:30:47.104 - AAAZAZ plus space entity boom. Now that's parts 00:30:47.104 --> 00:30:48.970 - being recognized. 00:30:50.750 --> 00:30:57.302 - And we're going to need is I dollar one model that office can 00:30:57.302 --> 00:30:58.814 - see the screen. 00:30:59.570 --> 00:31:06.811 - Bottle and then on this line it's going to be I dollar 2 00:31:06.811 --> 00:31:10.224 - entity. And then instead of having a closing parenthesis, 00:31:10.224 --> 00:31:13.708 - were telling it that we want to make another line and put a 00:31:13.708 --> 00:31:16.924 - context on there. So if I say to find next and replace. 00:31:17.890 --> 00:31:19.922 - We ended up with this OK, so I'm 00:31:19.922 --> 00:31:23.250 - slightly off here. So I need to undo that. I need to put 00:31:23.250 --> 00:31:24.396 - my come on before the line. 00:31:26.770 --> 00:31:28.048 - And then let's try that again. 00:31:30.600 --> 00:31:34.338 - OK, that's what I wanted to say and do all that stuff. So now. 00:31:35.050 --> 00:31:37.966 - For safety sake, I'm going to copy this out 00:31:37.966 --> 00:31:39.262 - to a notepad window. 00:31:41.700 --> 00:31:43.688 - Because transitioning to the. 00:31:45.280 --> 00:31:48.799 - The Big Replaceall. Sometimes it loses what it had. 00:31:49.560 --> 00:31:50.580 - But looks like. 00:31:52.560 --> 00:31:54.270 - Yeah, it lost what it had. 00:31:54.860 --> 00:31:56.558 - That's why I copied it out. 00:31:57.220 --> 00:31:58.276 - So that I could keep it. 00:31:59.440 --> 00:32:02.050 - Boom so now I can say. 00:32:02.640 --> 00:32:04.728 - Replace all and should give me. 00:32:05.360 --> 00:32:07.150 - Some number of them replaced. 00:32:09.580 --> 00:32:11.478 - Now I don't have to go to every single file and do this. 00:32:15.720 --> 00:32:18.840 - And for the ones that don't have the new lines already in there, 00:32:18.840 --> 00:32:22.200 - I can just modify this regex a little bit and it should be fine 00:32:22.200 --> 00:32:23.400 - to make it do that. 00:32:28.620 --> 00:32:28.830 - No. 00:32:31.070 --> 00:32:35.726 - OK. So that was 84 of them, and we think I think there's 00:32:35.726 --> 00:32:36.818 - probably around 120 total. 00:32:37.690 --> 00:32:40.040 - So let's see how many errors were down to now. 00:32:46.660 --> 00:32:47.320 - 33 00:32:49.390 --> 00:32:53.842 - OK, so we're gonna do some stuff here. Where like it's just 00:32:53.842 --> 00:32:55.326 - missing the namespace task. 00:32:58.280 --> 00:33:02.586 - So. OK, so these two spots had that problem. 00:33:03.750 --> 00:33:06.222 - This is an override, so it's supposed to just do it in 00:33:06.222 --> 00:33:08.488 - her doc, so let's make sure that that gets cleaned up. 00:33:14.720 --> 00:33:17.160 - These are all await operator 00:33:17.160 --> 00:33:20.280 - complaints. So I don't care about any of those, that's fine. 00:33:24.490 --> 00:33:28.174 - OK, so here's the one where it was not on, separated into 00:33:28.174 --> 00:33:29.709 - separate lines so it didn't 00:33:29.709 --> 00:33:34.528 - match. So what we're going to do is reopen it, and then we're 00:33:34.528 --> 00:33:37.982 - basically run the regex without that part of the line here. 00:33:38.820 --> 00:33:40.665 - In here, and assume that they're just like right 00:33:40.665 --> 00:33:41.485 - next to each other. 00:33:43.310 --> 00:33:45.438 - And then do a replace all again. 00:33:46.960 --> 00:33:48.780 - And that works that got that one. 00:33:50.050 --> 00:33:52.630 - You know this one doesn't have its inherit Docs. I'm going to 00:33:52.630 --> 00:33:53.920 - hit that, throw it on there. 00:33:58.960 --> 00:34:01.221 - It looks like we did one replace 00:34:01.221 --> 00:34:03.208 - switches. Not quite right. 00:34:06.070 --> 00:34:09.850 - OK, so the error that we're looking for here is 115, so 00:34:09.850 --> 00:34:11.425 - there's six of these left. 00:34:13.310 --> 00:34:15.620 - So this one's a special case. It had some extra characters 00:34:15.620 --> 00:34:17.720 - in it, so I'm just going to this one manually. 00:34:19.970 --> 00:34:22.337 - There's probably going to couple like this. I'll just 00:34:22.337 --> 00:34:23.126 - copy this part. 00:34:25.150 --> 00:34:27.778 - So there's only five things left up. This one. It had one 00:34:27.778 --> 00:34:28.873 - new line, but not 2. 00:34:30.430 --> 00:34:34.630 - And this one had one line about two, so that was the 00:34:34.630 --> 00:34:35.330 - problem here. 00:34:37.370 --> 00:34:38.630 - Same thing here. 00:34:40.850 --> 00:34:43.790 - Just adding the stuff and correcting a manually. So now 00:34:43.790 --> 00:34:47.318 - instead of having corrected, you know over 100 I really had to 00:34:47.318 --> 00:34:48.494 - manually create a handful. 00:34:51.790 --> 00:34:57.185 - And this guy is also unique in that it has the braces on 00:34:57.185 --> 00:34:58.845 - it. So async task. 00:35:01.000 --> 00:35:01.930 - Do you think? 00:35:03.250 --> 00:35:04.519 - Paste that there. 00:35:06.100 --> 00:35:06.550 - Boom 00:35:08.530 --> 00:35:12.053 - now this complete here. It seems that says that it's going to run 00:35:12.053 --> 00:35:15.034 - a synchronously. What I can do manually on this stuff is 00:35:15.034 --> 00:35:16.660 - basically just do a task that 00:35:16.660 --> 00:35:19.150 - result like this. Sorry, test. 00:35:19.960 --> 00:35:21.010 - From results 00:35:22.320 --> 00:35:23.040 - that. 00:35:24.910 --> 00:35:27.690 - And that would satisfy that condition where we take the 00:35:27.690 --> 00:35:30.748 - async often, we're just doing it like this, but that requires 00:35:30.748 --> 00:35:34.084 - manually looking at each one and messing with it, and I don't 00:35:34.084 --> 00:35:37.420 - really want to do that. All of these are the moments and 00:35:37.420 --> 00:35:40.200 - actually work about that offline and not during the training 00:35:40.200 --> 00:35:43.814 - part. So let's just take those out. The work flows down to 45 00:35:43.814 --> 00:35:45.204 - errors or 24 hours rather. 00:35:54.010 --> 00:35:56.300 - OK, this is complaining 'cause it means the context here. 00:35:58.410 --> 00:35:59.770 - Opens at EE sink. 00:36:01.400 --> 00:36:03.650 - OK. So that was better. 00:36:04.470 --> 00:36:08.227 - So now the errors seem to all be just in this one spot. 00:36:11.240 --> 00:36:12.310 - Current project. 00:36:14.840 --> 00:36:16.040 - So let's tweet you. 00:36:17.970 --> 00:36:21.126 - Yeah, so there's 22 issues in this one file here. So now 00:36:21.126 --> 00:36:24.019 - we're really just dealing with this one thing and our main 00:36:24.019 --> 00:36:26.386 - change the T4 into this other parts parts parts. 00:36:28.330 --> 00:36:29.534 - Is all kind of taken care of. 00:36:30.140 --> 00:36:32.505 - So now that we have this thing and we have our 00:36:32.505 --> 00:36:34.655 - context, this can go like resolve and generate the type 00:36:34.655 --> 00:36:35.945 - in there if it needs it. 00:36:37.280 --> 00:36:41.180 - And that would allow us like if it was a download that was 00:36:41.180 --> 00:36:44.780 - coming in from connect on the product model itself. We can go 00:36:44.780 --> 00:36:48.080 - generate a type ID based on the information that was passed 00:36:48.080 --> 00:36:51.680 - along from connect. In case this is data being seated in on 00:36:51.680 --> 00:36:54.080 - thousands of products or hundreds of thousands of 00:36:54.080 --> 00:36:57.144 - products. For stuff with downloads from a third 00:36:57.144 --> 00:36:59.320 - party integration, like in your pee or whatever. 00:37:00.460 --> 00:37:04.000 - Is that what you care of all that for us? So now we have an 00:37:04.000 --> 00:37:06.596 - auto generated ID. If it wasn't already there called Type ID. 00:37:07.700 --> 00:37:09.870 - And now we want to check if. 00:37:10.550 --> 00:37:12.179 - Entity type ID. 00:37:13.800 --> 00:37:17.670 - Is not equal to the type ID that we generated. 00:37:19.170 --> 00:37:20.649 - Then return false. 00:37:21.500 --> 00:37:24.063 - And then we just have our little else continue government here. 00:37:25.200 --> 00:37:28.190 - So now we verified that the those three custom properties 00:37:28.190 --> 00:37:31.479 - that are on that product download or there and that the 00:37:31.479 --> 00:37:35.067 - type is matched an. We verified by all this info because it 00:37:35.067 --> 00:37:38.954 - would have generated the same ID if it was already there with all 00:37:38.954 --> 00:37:43.834 - that stuff. OK, so if you go into the entity here I want to 00:37:43.834 --> 00:37:46.462 - look at this relative URL. There's those three ones. 00:37:46.462 --> 00:37:49.674 - There's the product matching it is an AMOLED base. Now the 00:37:49.674 --> 00:37:52.886 - name always part should already be handled. So if I do 00:37:52.886 --> 00:37:54.638 - this and go to base symbol. 00:37:55.690 --> 00:37:58.693 - Or rather, not that I want to go to this guy. 00:38:00.290 --> 00:38:03.350 - The match additional properties. 00:38:05.170 --> 00:38:06.730 - Is checking 00:38:08.060 --> 00:38:09.926 - the custom key and the hash. 00:38:11.390 --> 00:38:13.820 - And it does not checking anything else. So it is 00:38:13.820 --> 00:38:15.035 - currently not checking the name 00:38:15.035 --> 00:38:18.540 - in the description. So for the moment I'm going to add these, 00:38:18.540 --> 00:38:20.850 - although I don't know why I don't have those in my. 00:38:22.030 --> 00:38:25.580 - Ann it should be 4 checks. 00:38:27.200 --> 00:38:31.340 - So at some point I will go back and fix the T4 so that these 00:38:31.340 --> 00:38:32.720 - guys properties get checked. I 00:38:32.720 --> 00:38:35.218 - don't know why. Out there, but I will fix that at some 00:38:35.218 --> 00:38:36.250 - point and it will be OK. 00:38:39.860 --> 00:38:41.966 - Why is it doing the intelligent? 00:38:43.100 --> 00:38:47.216 - I have it right there. Why do you care? Stop it. OK, so we 00:38:47.216 --> 00:38:50.744 - checked to make sure all those are good and then the last 00:38:50.744 --> 00:38:53.978 - thing we gotta check is basically do we have a valid 00:38:53.978 --> 00:38:56.918 - product? So this chunk here that was referencing master ID. 00:38:56.918 --> 00:38:58.388 - I just want replacement product. 00:39:06.940 --> 00:39:10.220 - Now because we have product here, we don't auto generator 00:39:10.220 --> 00:39:14.484 - product but we do want to make sure that we end up with 00:39:14.484 --> 00:39:18.748 - a good product ID. So product ID is equal to work bro. Wait 00:39:18.748 --> 00:39:19.404 - workflows dot. 00:39:20.740 --> 00:39:24.195 - Value dot products dot resolve 00:39:24.195 --> 00:39:27.370 - to ID. And it's not optional. 00:39:28.360 --> 00:39:30.106 - So we're gonna do that part. 00:39:31.160 --> 00:39:33.272 - And then we basically do some of the same stuff here. So 00:39:33.272 --> 00:39:34.328 - I'm going to grab this part. 00:39:35.700 --> 00:39:36.928 - And Drop it here. 00:39:40.010 --> 00:39:43.310 - I'm gonna do this and say product product doesn't have a 00:39:43.310 --> 00:39:45.110 - display name so that goes away. 00:39:47.020 --> 00:39:50.089 - And it. We don't have. 00:39:51.950 --> 00:39:54.910 - The SCO euro should be getting checked off of this. 00:39:56.800 --> 00:39:58.228 - May have lost all the other games. 00:39:59.920 --> 00:40:03.550 - OK, something, so just the last thing. Yeah yeah. So this 00:40:03.550 --> 00:40:07.180 - function currently on the product does not take in the SCO 00:40:07.180 --> 00:40:12.130 - URL, but I am going to need it to be as imaginable thing. So at 00:40:12.130 --> 00:40:16.750 - some point I only go in and fix this so that it actually takes 00:40:16.750 --> 00:40:21.040 - it in the SCO URL. Technically, that also means that this S URL 00:40:21.040 --> 00:40:25.330 - would not be valid, so I'm going to put that into a comment. 00:40:29.810 --> 00:40:31.234 - I'm gonna put it to do on that. 00:40:34.140 --> 00:40:37.484 - And I'll even put it at JTG on it so that it says that I'm the 00:40:37.484 --> 00:40:38.738 - one who's going to fix it. 00:40:44.950 --> 00:40:49.126 - Now that at window really helps when you go in and do 00:40:49.126 --> 00:40:51.214 - the resharper window there should be. 00:40:52.260 --> 00:40:54.436 - A window that is like the to do 00:40:54.436 --> 00:40:56.960 - Explorer. There we go, so I 00:40:56.960 --> 00:41:00.054 - bring that up. Stick it over here for the moment. 00:41:02.580 --> 00:41:04.240 - You can do by. 00:41:04.910 --> 00:41:07.869 - Project structure and then life. I find that same one here. 00:41:09.320 --> 00:41:11.220 - This is in the products. 00:41:12.890 --> 00:41:15.530 - You can see the to do an who they are assigned to, 00:41:15.530 --> 00:41:16.190 - which is cool. 00:41:18.680 --> 00:41:22.550 - So I'll usually do like to do at myself or I'll put at me for 00:41:22.550 --> 00:41:25.646 - middle end or Beaver back end Fe for front end. So basically 00:41:25.646 --> 00:41:29.000 - anyone on the front end team should go in and look at. These 00:41:29.000 --> 00:41:32.096 - are a good place that like if you're looking for something in 00:41:32.096 --> 00:41:35.192 - the code later down the road and you're like there's something in 00:41:35.192 --> 00:41:38.288 - here that should get reviewed. Providers have a lot of stuff in 00:41:38.288 --> 00:41:41.642 - here like that, like this guy has a bunch of loops that should 00:41:41.642 --> 00:41:44.738 - be taken care of at some point. That's some good places where 00:41:44.738 --> 00:41:47.576 - people should probably do some things that need to get fixed. 00:41:49.680 --> 00:41:52.800 - No admin calls for the quote. Check out OK. Well, we don't 00:41:52.800 --> 00:41:55.920 - have that built in the UI yet, so we haven't built any 00:41:55.920 --> 00:41:59.040 - of the API calls yet. So at some point someone will go 00:41:59.040 --> 00:42:00.080 - ahead and do those. 00:42:01.480 --> 00:42:04.060 - And the studio Explorer that from Resharper is really nice 00:42:04.060 --> 00:42:06.124 - compared to the built-in one from Visual Studio. 00:42:10.340 --> 00:42:13.824 - OK, so we know we ended up with a good quote, Unquote product 00:42:13.824 --> 00:42:16.772 - ID, and if it didn't this would have thrown exception which 00:42:16.772 --> 00:42:19.452 - would have killed the whole process. Same thing here. Like 00:42:19.452 --> 00:42:23.204 - if we didn't end up with a good type ID it would have killed 00:42:23.204 --> 00:42:24.276 - the whole process OK? 00:42:25.800 --> 00:42:29.870 - So we just need to really check the product ID. 00:42:33.490 --> 00:42:37.018 - Against our party that we checked and this is not going to 00:42:37.018 --> 00:42:40.252 - generate one 'cause we don't want to generate a product off 00:42:40.252 --> 00:42:42.898 - of this from the download perspective that's not allowed. 00:42:42.898 --> 00:42:45.544 - The aggregate processes basically do. The primary is the 00:42:45.544 --> 00:42:48.778 - product, not the primary as the product download. We don't want 00:42:48.778 --> 00:42:52.012 - to be like cross populating a whole bunch of downloads and 00:42:52.012 --> 00:42:53.776 - other weird stuff now as we 00:42:53.776 --> 00:42:57.882 - found that. I don't have that to do and I don't have a 00:42:57.882 --> 00:43:00.666 - slave ID to deal with so I can get rid of that. 00:43:01.830 --> 00:43:04.914 - And then the last thing we're checking here is that the Jason 00:43:04.914 --> 00:43:06.456 - attributes are the same, and if 00:43:06.456 --> 00:43:08.420 - they're not. Then 00:43:09.660 --> 00:43:11.070 - basically for this function is doing. 00:43:12.160 --> 00:43:15.293 - Is calling back and saying if any of this data does not match, 00:43:15.293 --> 00:43:18.426 - it means that the record has been changed. In it. We need to 00:43:18.426 --> 00:43:21.559 - update in the database if it's the same then we don't try to 00:43:21.559 --> 00:43:25.498 - modify the collection. In any way, and so we're good there. 00:43:27.390 --> 00:43:28.878 - And in the next function here. 00:43:30.300 --> 00:43:32.610 - We don't need that. We don't need this category stuff, so 00:43:32.610 --> 00:43:34.080 - let's just give it a category stuff. 00:43:35.370 --> 00:43:36.994 - It all has to do with that other 00:43:36.994 --> 00:43:39.558 - stuff. And that got our errors down. 00:43:40.780 --> 00:43:42.908 - Now what we have to deal with? 00:43:43.990 --> 00:43:45.220 - Is. 00:43:48.200 --> 00:43:49.840 - Stuff that is good for. 00:43:50.460 --> 00:43:51.100 - Products. 00:43:54.210 --> 00:43:56.220 - OK. So. 00:43:57.660 --> 00:44:02.043 - This was very gratifying that there was data, so 00:44:02.043 --> 00:44:06.913 - this needs to say that the must pass valid existing. 00:44:09.110 --> 00:44:11.640 - Ballad comma existing product info. 00:44:13.770 --> 00:44:14.510 - Though. 00:44:16.500 --> 00:44:18.900 - And a type. 00:44:19.540 --> 00:44:26.270 - And a. Uh, absolute or relative URL. 00:44:27.180 --> 00:44:29.304 - So basically this is if there's something that was 00:44:29.304 --> 00:44:32.136 - going to fail, it would kick out all that stuff based upon 00:44:32.136 --> 00:44:33.316 - this stuff coming out bad. 00:44:35.520 --> 00:44:36.150 - OK. 00:44:37.880 --> 00:44:39.300 - So I don't really need. 00:44:40.230 --> 00:44:42.890 - This in that same way we don't need to do any of this other. 00:44:42.890 --> 00:44:45.740 - This is all like it has that all kind of had to do with the. 00:44:46.290 --> 00:44:50.090 - Categories, let's just start assigning stuff correctly. So 00:44:50.090 --> 00:44:55.315 - new entity dot absolute URL equal to model dot absolute URL. 00:44:57.580 --> 00:44:59.518 - And will do the relative URL. 00:45:02.680 --> 00:45:04.396 - And we'll do our is property. 00:45:09.470 --> 00:45:10.660 - There we go. Stop complaining. 00:45:12.610 --> 00:45:14.638 - And in fact, I'm actually going to do some extra checking here 00:45:14.638 --> 00:45:15.821 - that says that, like if this is. 00:45:16.900 --> 00:45:19.608 - A contract that is. 00:45:21.010 --> 00:45:26.236 - Not here we're gonna do this here. If new is new entity dot. 00:45:27.160 --> 00:45:29.620 - He is absolute URL then. 00:45:30.530 --> 00:45:35.206 - When do you dispatch? I read it or we're going to do this batch 00:45:35.206 --> 00:45:40.330 - of its. So that we guarantee it's always the same setup on 00:45:40.330 --> 00:45:44.180 - it. So if it is an absolute URL, the relative URL should 00:45:44.180 --> 00:45:46.580 - be null. If it's not an absolute URL, then relative 00:45:46.580 --> 00:45:48.020 - and absolute URL should be null. 00:45:55.170 --> 00:45:56.890 - Sure. 00:45:58.270 --> 00:45:59.380 - Boom like that. 00:46:01.480 --> 00:46:04.980 - So we have one ternary or not even turn it. We have one if 00:46:04.980 --> 00:46:07.480 - statement, it's taken care of that, and dropping those in. 00:46:08.680 --> 00:46:09.888 - Now the type ID. 00:46:11.950 --> 00:46:13.190 - That we did over here. 00:46:15.780 --> 00:46:19.574 - We need to do the same thing here, and we're going to say new 00:46:19.574 --> 00:46:25.274 - entity. Type ID type ID equals 2 type ID. 00:46:26.640 --> 00:46:27.240 - Boom 00:46:29.320 --> 00:46:31.322 - this is currently not stay synced, but I will send it 00:46:31.322 --> 00:46:31.868 - to a sink. 00:46:33.710 --> 00:46:38.186 - And it's already got everything else it needs for that and the. 00:46:39.040 --> 00:46:40.140 - Var. 00:46:41.690 --> 00:46:45.086 - Now we're not going to do the product ID here, because we 00:46:45.086 --> 00:46:47.633 - should already have that outside of this Association. Is 00:46:47.633 --> 00:46:50.180 - workflow 'cause we're in the associations work for the 00:46:50.180 --> 00:46:53.293 - product itself. We already know who the product is, and it's 00:46:53.293 --> 00:46:56.406 - going to sign that elsewhere, so we don't know what they're 00:46:56.406 --> 00:46:56.689 - here. 00:46:57.710 --> 00:46:59.660 - So we're going to say product. 00:47:00.690 --> 00:47:04.548 - Download properties and. 00:47:06.270 --> 00:47:08.460 - Related objects. 00:47:09.900 --> 00:47:12.133 - So we know that we're covering all of our bases there. 00:47:14.140 --> 00:47:16.804 - And so now we have our Association workflow. It 00:47:16.804 --> 00:47:19.468 - should not be set up to do everything correctly. 00:47:19.468 --> 00:47:22.428 - Assigning data in values. Let's do a build on the 00:47:22.428 --> 00:47:23.020 - workflow here. 00:47:24.130 --> 00:47:25.555 - Make sure that our workflow 00:47:25.555 --> 00:47:28.238 - builds. Good and shiny. 00:47:31.680 --> 00:47:33.540 - Collapse all that clips on that. 00:47:34.890 --> 00:47:37.530 - It was succeeded. OK, so now we're going over the product 00:47:37.530 --> 00:47:40.677 - workflow. And we're going to double check that the create 00:47:40.677 --> 00:47:42.864 - an update functions that I know are over ridden. 00:47:47.050 --> 00:47:49.954 - Are gonna handle this and not lose what we were trying to 00:47:49.954 --> 00:47:51.890 - do. So here's the run. Default associate workflows. 00:47:51.890 --> 00:47:54.552 - OK so that's going to the one that was before generates 00:47:54.552 --> 00:47:55.278 - that parts fine. 00:47:57.810 --> 00:48:01.099 - Uh, that legacy product is going to take care of that part and 00:48:01.099 --> 00:48:02.617 - then we have the update async. 00:48:05.250 --> 00:48:07.140 - Yeah, we just need to double check that it's 00:48:07.140 --> 00:48:08.190 - going to handle it too. 00:48:10.260 --> 00:48:11.679 - Do do do. 00:48:12.300 --> 00:48:15.324 - Limited relate workflows, party image default associates. OK, so 00:48:15.324 --> 00:48:19.356 - this one is also going to handle it. That would be OK. 00:48:20.410 --> 00:48:23.380 - The absurd just calling in to those guys, so I 00:48:23.380 --> 00:48:24.568 - think we're good there. 00:48:27.020 --> 00:48:30.420 - OK, So what we need to do now? 00:48:31.630 --> 00:48:33.358 - Close all tabs. 00:48:37.040 --> 00:48:40.835 - OK, good you should say all close all documents tab, that's 00:48:40.835 --> 00:48:45.495 - weird. OK, so I think our workflows there is good. 00:48:46.690 --> 00:48:47.998 - You can call that one done. 00:48:49.120 --> 00:48:51.520 - OK, the current project. It's complaining because that 00:48:51.520 --> 00:48:52.720 - workflows DLL wasn't there. 00:48:53.670 --> 00:48:55.140 - I'm going to do a full build 00:48:55.140 --> 00:48:57.380 - real quick. How to rebuild but build? 00:48:58.700 --> 00:49:01.700 - And I don't need this one anymore. Clothes that get out of 00:49:01.700 --> 00:49:04.570 - the way. And I don't need. 00:49:05.460 --> 00:49:08.100 - The win merge right now it's going to close that. 00:49:09.090 --> 00:49:13.458 - Log and see if there's anything new here that I need to add or 00:49:13.458 --> 00:49:17.202 - market leader or anything should be a lot more files changed now 00:49:17.202 --> 00:49:20.946 - because the we modify the T4, so you'll see there's 133 file 00:49:20.946 --> 00:49:24.429 - soudal. And there's this new file that we've added manually. 00:49:25.620 --> 00:49:26.980 - Just want to make sure we add that. 00:49:28.330 --> 00:49:29.029 - There we go. 00:49:31.150 --> 00:49:33.946 - And you can see like here's a shopping cart, one that got 00:49:33.946 --> 00:49:36.975 - modifications. So like it out of the async there and it added the 00:49:36.975 --> 00:49:38.140 - await and passing the context. 00:49:38.760 --> 00:49:41.820 - And the T4 added the context over here. All that stuff looks 00:49:41.820 --> 00:49:44.625 - good. It repeats that same kind of stuff all throughout the 00:49:44.625 --> 00:49:46.410 - file. So this is just like a 00:49:46.410 --> 00:49:49.154 - good spot check. That somewhere else in the file00:49:49.154 --> 00:49:50.288 - that everything there was still good. 00:49:51.320 --> 00:49:54.479 - OK, now what I'm going to do is, I'm actually just going to 00:49:54.479 --> 00:49:55.694 - commit, but I've got now. 00:49:57.240 --> 00:50:02.874 - So we got mapping and were closed layer mapping 00:50:02.874 --> 00:50:06.630 - workflows layers updated for product downloads. 00:50:08.620 --> 00:50:09.990 - So commit and push that. 00:50:13.830 --> 00:50:16.866 - That way when I start working with services layer I don't have 00:50:16.866 --> 00:50:18.384 - as many files to look through. 00:50:19.100 --> 00:50:19.880 - On this. 00:50:21.220 --> 00:50:24.280 - So the first thing we do here is let's run the C4. 00:50:42.960 --> 00:50:46.520 - And hopefully this should only be like one real change. 00:50:48.390 --> 00:50:49.359 - Or two rather. 00:50:53.020 --> 00:50:54.928 - So we can see the whoops. 00:50:56.580 --> 00:50:59.605 - Service project got those lines edited that say that it's you 00:50:59.605 --> 00:51:02.080 - know this, you know files another dependent underneath the 00:51:02.080 --> 00:51:07.270 - floor. The shooting files worth of routes and handlers have been 00:51:07.270 --> 00:51:10.390 - added. If I Scroll down in here. 00:51:11.910 --> 00:51:15.102 - I should see those new files. They are right there in there. 00:51:15.102 --> 00:51:16.166 - If I open it. 00:51:16.880 --> 00:51:20.996 - You can see we have get product downloads which is the light 00:51:20.996 --> 00:51:24.426 - mapping. There's a cache copy of that endpoint. There's as 00:51:24.426 --> 00:51:27.940 - listing. Listing cash for connect so that if we do any 00:51:27.940 --> 00:51:30.760 - connect stuff we can get the get the full list of everything. 00:51:31.320 --> 00:51:32.736 - The digest, which is also used 00:51:32.736 --> 00:51:39.898 - by connects. By ID cast by key cash by name 00:51:39.898 --> 00:51:46.490 - cast. Check if it exists by ID, cash by key cast. 00:51:47.120 --> 00:51:51.728 - By name, cash lots of endpoints here. Create it. 00:51:52.340 --> 00:51:55.112 - Upsurt it updated. Now upsert what that does. Is it basically 00:51:55.112 --> 00:51:57.632 - internally checks to see if there are like identifying keys 00:51:57.632 --> 00:52:01.160 - or anything and if it can find it, it will call the update. If 00:52:01.160 --> 00:52:03.680 - it can't find, it will create internally. That's all that 00:52:03.680 --> 00:52:05.192 - really does is just to redirect. 00:52:06.090 --> 00:52:08.838 - That way, if you don't know if the records there yet, which 00:52:08.838 --> 00:52:11.815 - would be good for connect, you can just spit at the wall and 00:52:11.815 --> 00:52:12.502 - see what sticks. 00:52:14.190 --> 00:52:17.840 - Then there's deactivate by idea, by. By key does not 00:52:17.840 --> 00:52:20.760 - have cash endpoints. Reactivate by idea, by key. 00:52:21.970 --> 00:52:25.974 - Delete by ID and by key, and then here's the clear. The cache 00:52:25.974 --> 00:52:29.362 - endpoint, which happens which goes to a thing in the admin. 00:52:29.362 --> 00:52:32.442 - All those handlers in here. So like here's the gate 00:52:32.442 --> 00:52:35.830 - collections. If you want to get the product downloads, it uses 00:52:35.830 --> 00:52:39.526 - all of this stuff in a way that basically is repeatable as 00:52:39.526 --> 00:52:43.222 - possible, so we're passing in all this stuff and we used to 00:52:43.222 --> 00:52:46.610 - use our interfaces in our generics in order to run all 00:52:46.610 --> 00:52:50.306 - this stuff in exactly the same way all over the place. And 00:52:50.306 --> 00:52:53.386 - these things are virtual, so they can be over ridden. 00:52:53.930 --> 00:52:56.845 - Some of these places that do get overwritten like on the 00:52:56.845 --> 00:52:59.495 - product, one that get products we will go append additional 00:52:59.495 --> 00:53:02.410 - data onto the request at the server side. Stuff that might 00:53:02.410 --> 00:53:04.000 - not be on these things here. 00:53:05.270 --> 00:53:07.720 - So we get to call those things in there and we get over item. 00:53:09.630 --> 00:53:12.897 - On that stuff, there's get singles. You know some of these 00:53:12.897 --> 00:53:16.164 - do stuff that where it's calling the workflow directly. The cash 00:53:16.164 --> 00:53:18.837 - ones called this create and return cash result, which 00:53:18.837 --> 00:53:22.104 - basically you pass in a funk that calls this other function, 00:53:22.104 --> 00:53:25.371 - which would doesn't normally, and then it would go cash the 00:53:25.371 --> 00:53:29.232 - result in Redis. It's all using async stuff. You have to wait on 00:53:29.232 --> 00:53:31.905 - this side. You cannot just return the task because 00:53:31.905 --> 00:53:35.172 - otherwise it will serialize the task into the response over the 00:53:35.172 --> 00:53:37.251 - wire which you don't want to do. 00:53:38.700 --> 00:53:42.300 - There's no bueno, so we take those to make sure they get 00:53:42.300 --> 00:53:45.000 - awaited here. This internally does, uh, wait it correctly 00:53:45.000 --> 00:53:48.300 - and serves it back on the cash and points we don't 00:53:48.300 --> 00:53:49.500 - worry about that here. 00:53:51.650 --> 00:53:54.147 - You're clearing cache gets to do stuff in here and it 00:53:54.147 --> 00:53:56.190 - knows how to generate the keys with the urns. 00:53:57.600 --> 00:54:00.801 - In order to clear that stuff out of the Redis caches 00:54:00.801 --> 00:54:03.420 - correctly with all these different things that can be 00:54:03.420 --> 00:54:06.912 - cashed will get cast off when you click that button in the 00:54:06.912 --> 00:54:07.203 - admin. 00:54:08.510 --> 00:54:11.264 - Here's the partial class that basically here's the base 00:54:11.264 --> 00:54:14.630 - one, so this is the class that you would populate with 00:54:14.630 --> 00:54:17.078 - your with your overrides. An example of that. 00:54:18.120 --> 00:54:19.555 - If I go to the product service 00:54:19.555 --> 00:54:23.532 - here. And then I look in here like here's get products, so 00:54:23.532 --> 00:54:25.890 - we're overriding so that we can inject this pricing 00:54:25.890 --> 00:54:28.248 - factory context on the onto the request. Otherwise this 00:54:28.248 --> 00:54:30.868 - would just be doing the basic of what we're doing 00:54:30.868 --> 00:54:33.226 - internally, like these. Three lines are exactly what it 00:54:33.226 --> 00:54:35.322 - would be in the what it's over writing. 00:54:36.490 --> 00:54:36.850 - Uh. 00:54:38.370 --> 00:54:41.370 - But because we're overwriting it, we're getting it to add 00:54:41.370 --> 00:54:42.570 - this pricing factory context. 00:54:46.940 --> 00:54:49.148 - That way, even though there's 24 generated for 00:54:49.148 --> 00:54:51.356 - default stuff, you can still override it in 00:54:51.356 --> 00:54:53.840 - manually update stuff and it will use this overridden 00:54:53.840 --> 00:54:56.048 - copy of the handler instead, which is good. 00:55:02.080 --> 00:55:05.830 - Now that we have our crud operations, or rather extended 00:55:05.830 --> 00:55:08.830 - crud operations, we also have activate, reactivate and 00:55:08.830 --> 00:55:12.580 - multiple versions of Getson reads. I can now build the 00:55:12.580 --> 00:55:17.256 - service project. And the output is saying that. 00:55:22.730 --> 00:55:25.016 - Kate built succeeded when I do a full build. 00:55:26.870 --> 00:55:29.450 - So that has a chance to update all of these guys too. 00:55:33.260 --> 00:55:35.956 - OK, so that is all of that stuff. 00:55:37.140 --> 00:55:38.259 - That is basically. 00:55:38.840 --> 00:55:39.620 - Uh. 00:55:40.670 --> 00:55:43.420 - Until what will have to deal with like the checkout provider 00:55:43.420 --> 00:55:46.670 - and stuff like that so that it knows to like add these things 00:55:46.670 --> 00:55:49.670 - to the users stuff. But as far as creating the endpoints in 00:55:49.670 --> 00:55:52.170 - everything we are now done there and we could start 00:55:52.170 --> 00:55:54.920 - running the force to get this stuff into the storefront. Any 00:55:54.920 --> 00:55:57.670 - questions on the back end so far? Before I started working 00:55:57.670 --> 00:56:00.670 - under the storefront? Or do we want stopping you guys? Do the 00:56:00.670 --> 00:56:02.920 - other C sharporlike.net core stuff? Yeah, I think probably 00:56:02.920 --> 00:56:06.420 - just at about time if you want to roll it to about 8 more 00:56:06.420 --> 00:56:09.420 - minutes. If you have time or if you don't want to start 00:56:09.420 --> 00:56:11.670 - something else, we can definitely jump into the next 00:56:11.670 --> 00:56:12.420 - section of training. 00:56:13.660 --> 00:56:17.490 - I can quickly cover the running the T4 for that 00:56:17.490 --> 00:56:19.022 - will generate the API. 00:56:20.220 --> 00:56:23.377 - It would be really cool man. So first there's the API 00:56:23.377 --> 00:56:25.960 - reference. When you run this guy discovered just iterates 00:56:25.960 --> 00:56:28.830 - through all the endpoints that can find everywhere and then 00:56:28.830 --> 00:56:31.700 - updates these files. I am working on this right now 00:56:31.700 --> 00:56:35.144 - 'cause I'm trying to add the app settings to it so there 00:56:35.144 --> 00:56:38.301 - will be an app settings, app metadata, HTML, an example of 00:56:38.301 --> 00:56:40.310 - what that looks like is this guy. 00:56:41.720 --> 00:56:42.350 - Um? 00:56:43.380 --> 00:56:46.292 - You can find this inside the admin if you go to the menu 00:56:46.292 --> 00:56:48.756 - and you say click on API reference. This is the page 00:56:48.756 --> 00:56:50.996 - you would get. It would have all these different things 00:56:50.996 --> 00:56:53.684 - like this copy that I have on page doesn't have all that. 00:56:55.500 --> 00:56:58.244 - And then you would click on it and you can see the route and 00:56:58.244 --> 00:57:00.204 - all that stuff. It just. It's basically just generating this 00:57:00.204 --> 00:57:02.940 - content. And then the app settings one here. 00:57:04.010 --> 00:57:06.950 - The copy that I have in the page. This is the new 00:57:06.950 --> 00:57:09.400 - student thing in front of AdWords. Got the API name. 00:57:11.260 --> 00:57:14.086 - And then you're like what's the key that it's 00:57:14.086 --> 00:57:16.912 - got? What's the default value? There's a couple of 00:57:16.912 --> 00:57:19.424 - these that are like Splittable us like what 00:57:19.424 --> 00:57:22.564 - does it split on or what can it split on? 00:57:24.070 --> 00:57:25.768 - One here that has multiple splits. 00:57:27.250 --> 00:57:29.306 - This was like comma delimited, so like payments 00:57:29.306 --> 00:57:31.619 - by custom visa comma delimited is what it's saying 00:57:31.619 --> 00:57:34.703 - here and I'm working through like if it finds this text. I 00:57:34.703 --> 00:57:37.530 - want to make like turn it into like more verbose text 00:57:37.530 --> 00:57:40.100 - that's more relevant devoted person would read and I get 00:57:40.100 --> 00:57:42.927 - the XML docs populated on everything. But this is the T 00:57:42.927 --> 00:57:45.754 - for stuff that I'm working right now. So when you run 00:57:45.754 --> 00:57:48.067 - that, that's what this generating is all this stuff. 00:57:50.250 --> 00:57:53.526 - As it collapsed that and close it back out, you have to do 00:57:53.526 --> 00:57:56.298 - anything else with that one. Now there used to be like. 00:57:57.550 --> 00:57:59.270 - 2 three T fours. 00:58:00.930 --> 00:58:04.010 - Inside the UI layer. Now, because we've got these fully 00:58:04.010 --> 00:58:07.398 - separated and we now have vendor Admin Store Admin Anne Braden, 00:58:07.398 --> 00:58:12.018 - an store and Adam in each one of those has an API T4 and then 00:58:12.018 --> 00:58:13.866 - admin has two more T fours. 00:58:14.740 --> 00:58:17.974 - So that's a lot of teeth that you have to come in through and 00:58:17.974 --> 00:58:20.746 - run. If you're not sure where they all are, you can always 00:58:20.746 --> 00:58:21.901 - just do a dot TT. 00:58:25.070 --> 00:58:28.130 - And let it find everything and then we collapse all 00:58:28.130 --> 00:58:29.660 - go to the user interface. 00:58:30.690 --> 00:58:33.728 - You can find. Where are the T fours are? 00:58:35.210 --> 00:58:38.135 - Now just over again, if it's TT include that's not when you run, 00:58:38.135 --> 00:58:41.510 - you run the one that just has TD, so this one I'm going to run 00:58:41.510 --> 00:58:44.639 - the clear cache widget. And I want to run the types. 00:58:48.350 --> 00:58:50.429 - And then here is the service one. 00:58:51.790 --> 00:58:54.010 - The types one takes awhile because there's a whole lot 00:58:54.010 --> 00:58:54.898 - of files like rates. 00:59:03.720 --> 00:59:05.880 - See how it automatically generated these additional files 00:59:05.880 --> 00:59:08.850 - this so that you can manage these objects in the admin. 00:59:12.090 --> 00:59:15.606 - So our product download types get auto generated as as UI in 00:59:15.606 --> 00:59:18.243 - the admin. So add download apps whenever we want. 00:59:23.500 --> 00:59:28.118 - K. So I'm going to clear that I'm going to look at this and 00:59:28.118 --> 00:59:30.714 - see my product Swan has changed, so let's go look and 00:59:30.714 --> 00:59:31.894 - see what the changes were. 00:59:33.040 --> 00:59:35.430 - And make sure that we have changes that we actually 00:59:35.430 --> 00:59:35.908 - want here. 00:59:37.000 --> 00:59:39.149 - So our services generated that we had. 00:59:40.420 --> 00:59:42.380 - I tap that in 'cause it was posted. 00:59:44.050 --> 00:59:47.242 - This got changed a bunch. This changes whole lot of content in 00:59:47.242 --> 00:59:50.966 - this file like it adds a whole lot of stuff because of all the 00:59:50.966 --> 00:59:53.626 - endpoints and all the things that can go into those 00:59:53.626 --> 00:59:56.818 - endpoints, it has to iterate a lot of stuff into this stuff. 00:59:58.290 --> 01:00:02.697 - So that a pair of reference I am working on making that smaller 01:00:02.697 --> 01:00:07.782 - too, so it doesn't have to be as much of an impact, so our DTO 01:00:07.782 --> 01:00:10.833 - classes. OK so products downloads got it onto our 01:00:10.833 --> 01:00:13.884 - TypeScript layer. There's a price here that was not 01:00:13.884 --> 01:00:15.240 - nullable, but is Nullable. 01:00:16.830 --> 01:00:19.866 - So that got changed. The product download model got created which 01:00:19.866 --> 01:00:22.626 - has those things that it also inherits these other classes. 01:00:23.570 --> 01:00:24.719 - Or interfaces rather. 01:00:26.740 --> 01:00:30.524 - Download search model has this stuff. I need to make this. 01:00:31.280 --> 01:00:32.780 - Into a. 01:00:33.810 --> 01:00:36.930 - I made these two like that block and those four lines into into. 01:00:38.790 --> 01:00:41.680 - Inherited interfaces, they drop more lines out of this file. 01:00:43.340 --> 01:00:44.090 - So that would be good. 01:00:45.670 --> 01:00:52.468 - Um? You know, here's the DTO for that one. The two more 01:00:52.468 --> 01:00:53.842 - DTO's, another DTO. 01:00:54.600 --> 01:00:58.274 - Here's a couple of colors that can use like. Here's the 01:00:58.274 --> 01:00:59.610 - download cache type cash. 01:01:01.520 --> 01:01:04.180 - Create the product download type you know passing on the 01:01:04.180 --> 01:01:06.574 - route params everything on it. That's all getting generated 01:01:06.574 --> 01:01:07.638 - by the TypeScript here. 01:01:08.790 --> 01:01:12.346 - T4 so all that stuff is good and I'm not. I'm not seeing any 01:01:12.346 --> 01:01:15.140 - other changes in that stuff. That would be weird. Which is 01:01:15.140 --> 01:01:16.928 - good. Nope, not that one. 01:01:18.060 --> 01:01:20.172 - I'm trying to open this one. My clear cache buttons widget. 01:01:20.172 --> 01:01:22.092 - We now have these extra buttons in here, so there's 01:01:22.092 --> 01:01:23.244 - two more cash is looking clear. 01:01:24.580 --> 01:01:28.067 - And there's the TypeScript handlers for it so that it calls 01:01:28.067 --> 01:01:31.237 - the correct end points in the API, not that fact. 01:01:32.070 --> 01:01:32.740 - Like that? 01:01:34.440 --> 01:01:39.600 - OK, the these are the extra files I created so that I 01:01:39.600 --> 01:01:43.470 - can manage the product download types in the admin 01:01:43.470 --> 01:01:43.900 - automatically. 01:01:46.040 --> 01:01:48.749 - Which you know automatically import like State names and 01:01:48.749 --> 01:01:52.361 - references and things like that. So all that stuff is handled for 01:01:52.361 --> 01:01:55.973 - you. There's even a translation thing that you can drop into the 01:01:55.973 --> 01:01:59.696 - translations file. I'm just giving you the basic English to 01:01:59.696 --> 01:02:02.716 - start with for what those keys are going to be. 01:02:04.110 --> 01:02:07.204 - So I go to. I go through when I update there periodically. In 01:02:07.204 --> 01:02:08.870 - fact I will go add those now. 01:02:10.130 --> 01:02:12.665 - I think it's actually got the wrong number of tabs on it right 01:02:12.665 --> 01:02:17.623 - now. So I'm going to copy this over to notepad. 01:02:30.170 --> 01:02:30.720 - The fireworks 01:02:32.260 --> 01:02:32.500 - right? 01:02:36.570 --> 01:02:37.798 - Someone's Mike is hot. 01:02:42.580 --> 01:02:44.750 - I'm Adam. OK. 01:02:46.180 --> 01:02:48.864 - So that will go into your translation sheet and this is 01:02:48.864 --> 01:02:51.450 - admin side. So let's go to the admin. 01:02:52.930 --> 01:02:53.320 - Back 01:02:54.920 --> 01:02:55.250 - down. 01:03:00.100 --> 01:03:01.609 - And then type. 01:03:04.950 --> 01:03:05.858 - And this was added. 01:03:10.470 --> 01:03:13.460 - Takes a hot 2nd for to update. There's no dupes, so this is 01:03:13.460 --> 01:03:16.220 - good and I have my English translation and then I will go 01:03:16.220 --> 01:03:18.520 - in and add those other ones. I'll do that later. 01:03:21.700 --> 01:03:22.240 - Not that. 01:03:24.230 --> 01:03:25.898 - OK, so those sockets added and 01:03:25.898 --> 01:03:30.658 - then. That's the Admin T4. The other ones you do the exact same 01:03:30.658 --> 01:03:33.947 - thing. Just look for anything time where like the TTL classes 01:03:33.947 --> 01:03:37.236 - suddenly looks like it shifted a bunch. If that happened, you 01:03:37.236 --> 01:03:40.525 - probably need to just double check with me in case something 01:03:40.525 --> 01:03:44.412 - else goes wrong. I might tell you to like clear like do a 01:03:44.412 --> 01:03:48.299 - clean and rebuild and do it again just to see if it can 01:03:48.299 --> 01:03:50.691 - realign. Sometimes this thing gets a little wonky. 01:03:53.130 --> 01:03:55.218 - And then it would be the same thing for like the storefront 01:03:55.218 --> 01:03:56.958 - when you would run the API and all that stuff. 01:03:59.810 --> 01:04:04.080 - And one last piece before I let this go, there is a file here 01:04:04.080 --> 01:04:07.435 - under shared this year used in Addendums. If you have an 01:04:07.435 --> 01:04:11.095 - endpoint that specifically needs to be used in the admin or store 01:04:11.095 --> 01:04:14.145 - admin or vendor admin store storefront and it's not getting 01:04:14.145 --> 01:04:18.110 - generated in the API, you need to add the used in that is 01:04:18.110 --> 01:04:22.075 - appropriate to it. To that end point and so that's part of why 01:04:22.075 --> 01:04:26.345 - these are all partial glasses. So if I needed to use one of our 01:04:26.345 --> 01:04:27.870 - new like product endpoint ones. 01:04:28.980 --> 01:04:33.110 - Here I would come in and I can just copy this guy for example. 01:04:34.810 --> 01:04:38.994 - They get. Product download types is listing for the 01:04:38.994 --> 01:04:42.756 - store front and then make sure that it has that there. 01:04:43.970 --> 01:04:48.938 - Now, I probably expecting this to work in the brand admin and. 01:04:49.980 --> 01:04:52.320 - Sorry Evan as well, so I'm going to store admin. 01:04:53.520 --> 01:04:57.356 - Used in brand admin. Used in admin. 01:05:00.770 --> 01:05:04.538 - OK, and in the storefront I would also expect the cash one. 01:05:05.390 --> 01:05:07.686 - We need to be on there too. 01:05:09.300 --> 01:05:11.772 - Does the surface continue using a lot of heavy caching, but the 01:05:11.772 --> 01:05:14.244 - brand the admin ones don't really use a lot of the cash, 01:05:14.244 --> 01:05:16.922 - they use more of the direct calls so they can stay up to 01:05:16.922 --> 01:05:18.776 - date and this one is being generated automatically, so 01:05:18.776 --> 01:05:20.836 - that's duplicate and I don't need to keep it there. 01:05:22.120 --> 01:05:25.186 - So if I do that now, the APIs that are on the other ones 01:05:25.186 --> 01:05:27.157 - will also generate these endpoints where they might not 01:05:27.157 --> 01:05:28.033 - have otherwise done it. 01:05:29.710 --> 01:05:31.579 - So that's what this using addendums is. 01:05:33.150 --> 01:05:35.400 - Huge file, I don't really have it sorted very well. 01:05:35.400 --> 01:05:36.750 - I need to sort it better. 01:05:38.800 --> 01:05:41.968 - Foot like regions and stuff in so that you can more 01:05:41.968 --> 01:05:44.560 - quickly find what you're looking for. But that's the 01:05:44.560 --> 01:05:45.712 - basics of this piece.