From b9cb809ce56cbf5d3b28fae83ee51412d40e6dd3 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:03:38 +0200 Subject: [PATCH 1/9] Remove 'totally' --- 14/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index 06e1bc0d967..d4a6c20904b 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -8,7 +8,7 @@ UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper b This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is totally fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is fine for anyone to use in their custom site implementations or packages as they wish. ## Accessing the IUmbracoMapper From d6915b3993132f77957554c1add0abe99e01ad2c Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:03:59 +0200 Subject: [PATCH 2/9] Remove 'very' --- 14/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index d4a6c20904b..1ef069b76ff 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -16,7 +16,7 @@ The IUmbracoMapper is registered with Dependency Injection (DI). It can therefor ## Mapping -Mapping with the UmbracoMapper works in ways very similar to AutoMapper: +Mapping with the UmbracoMapper works in ways similar to AutoMapper: ```csharp // assuming source is ISource, create a new target instance From b2b7ed1a6e213939f3ad981f680a9cba2263da20 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:04:56 +0200 Subject: [PATCH 3/9] Change 'various ' to 'multiple' --- 14/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index 1ef069b76ff..a268da50e52 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -93,7 +93,7 @@ The constructor function is used whenever the mapper is asked to create a target In other words, `umbracoMapper.Map(source)` will first run the construction function, and then the mapping action. On the other hand, `umbracoMapper.Map(source, target)` where target already exists, would only run the mapping action. -The UmbracoMapper class provides various overloads of the Define method: +The UmbracoMapper class provides multiple overloads of the Define method: - An overload accepting a constructor function and a mapping action, as presented above. - An overload accepting a mapping action only, which tells the mapper how to map to an existing target (but the mapper will not be able to create new target instances). From b5bb5267b42213a34ef6e091ffbdbf2ec2a84aab Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:05:59 +0200 Subject: [PATCH 4/9] Remove 'various' --- 14/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index a268da50e52..e80657b9c97 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -144,7 +144,7 @@ var target = umbracoMapper.Map(source, context => ## Umbraco.Code -Umbraco.Code is an assembly which should contain various coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. +Umbraco.Code is an assembly which should contain coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. The code lives in the [Umbraco.Code repository](https://github.com/umbraco/Umbraco-Code) and the tool is available via [Nuget](https://www.nuget.org/packages/Umbraco.Code/). It is included as a development dependency in Umbraco. From ad2692894aafe8341bc12ac03a2f3db53a8a67cc Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:08:00 +0200 Subject: [PATCH 5/9] Change 'i.e.' tot 'that is' --- 14/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index e80657b9c97..69179718791 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -3,7 +3,7 @@ Often in code there is a need to 'map' one object's properties to another type of object, and the 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} -UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, i.e. mappings need to be hand-written. +UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} From ac7c9d5a52c7bef5a0c4df9549f60dc08b3e82e9 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:10:54 +0200 Subject: [PATCH 6/9] Write shorter sentences --- 14/umbraco-cms/reference/mapping.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/14/umbraco-cms/reference/mapping.md b/14/umbraco-cms/reference/mapping.md index 69179718791..95f372b66f5 100644 --- a/14/umbraco-cms/reference/mapping.md +++ b/14/umbraco-cms/reference/mapping.md @@ -1,6 +1,6 @@ # UmbracoMapper -Often in code there is a need to 'map' one object's properties to another type of object, and the 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. +Often in code there is a need to 'map' one object's properties to another type of object. The 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. @@ -8,7 +8,7 @@ UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper b This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. ## Accessing the IUmbracoMapper @@ -168,7 +168,7 @@ private static void Map(ISource source, The analyzer verifies that every publicly settable property of target is assigned a value. If a property is not assigned a value, the tool raises a build error (ie. the code will not compile). -Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that, should a new property be added to ISource, an error would be raised until the corresponding mappings are updated. +Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that an error would be raised. Should a new property be added to ISource, the corresponding mappings must be updated. It is possible to exclude some properties from the check: From dae4be550a2ba5d575dc0b4539ce90dc894da8bf Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 26 Apr 2024 14:17:29 +0200 Subject: [PATCH 7/9] Update v10, 12 & 13 --- 10/umbraco-cms/reference/mapping.md | 16 +++++++--------- 12/umbraco-cms/reference/mapping.md | 14 +++++++------- 13/umbraco-cms/reference/mapping.md | 14 +++++++------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/10/umbraco-cms/reference/mapping.md b/10/umbraco-cms/reference/mapping.md index b630df39ecf..c134be10b68 100644 --- a/10/umbraco-cms/reference/mapping.md +++ b/10/umbraco-cms/reference/mapping.md @@ -1,20 +1,18 @@ --- - - meta.Title: "UmbracoMapper" --- # UmbracoMapper -Often in code there is a need to 'map' one object's properties to another type of object, and the 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. +Often in code there is a need to 'map' one object's properties to another type of object. The 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} -UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, i.e. mappings need to be hand-written. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is totally fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. ## Accessing the IUmbracoMapper @@ -22,7 +20,7 @@ The IUmbracoMapper is registered with Dependency Injection (DI). It can therefor ## Mapping -Mapping with the UmbracoMapper works in ways very similar to AutoMapper: +Mapping with the UmbracoMapper works in ways similar to AutoMapper: ```csharp // assuming source is ISource, create a new target instance @@ -99,7 +97,7 @@ The constructor function is used whenever the mapper is asked to create a target In other words, `umbracoMapper.Map(source)` will first run the construction function, and then the mapping action. On the other hand, `umbracoMapper.Map(source, target)` where target already exists, would only run the mapping action. -The UmbracoMapper class provides various overloads of the Define method: +The UmbracoMapper class provides multiple overloads of the Define method: - An overload accepting a constructor function and a mapping action, as presented above. - An overload accepting a mapping action only, which tells the mapper how to map to an existing target (but the mapper will not be able to create new target instances). @@ -150,7 +148,7 @@ var target = umbracoMapper.Map(source, context => ## Umbraco.Code -Umbraco.Code is an assembly which should contain various coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. +Umbraco.Code is an assembly which should contain coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. The code lives in the [Umbraco.Code repository](https://github.com/umbraco/Umbraco-Code) and the tool is available via [Nuget](https://www.nuget.org/packages/Umbraco.Code/). It is included as a development dependency in Umbraco. @@ -174,7 +172,7 @@ private static void Map(ISource source, The analyzer verifies that every publicly settable property of target is assigned a value. If a property is not assigned a value, the tool raises a build error (ie. the code will not compile). -Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that, should a new property be added to ISource, an error would be raised until the corresponding mappings are updated. +Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that an error would be raised. Should a new property be added to ISource, the corresponding mappings must be updated. It is possible to exclude some properties from the check: diff --git a/12/umbraco-cms/reference/mapping.md b/12/umbraco-cms/reference/mapping.md index 06e1bc0d967..95f372b66f5 100644 --- a/12/umbraco-cms/reference/mapping.md +++ b/12/umbraco-cms/reference/mapping.md @@ -1,14 +1,14 @@ # UmbracoMapper -Often in code there is a need to 'map' one object's properties to another type of object, and the 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. +Often in code there is a need to 'map' one object's properties to another type of object. The 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} -UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, i.e. mappings need to be hand-written. +UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is totally fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. ## Accessing the IUmbracoMapper @@ -16,7 +16,7 @@ The IUmbracoMapper is registered with Dependency Injection (DI). It can therefor ## Mapping -Mapping with the UmbracoMapper works in ways very similar to AutoMapper: +Mapping with the UmbracoMapper works in ways similar to AutoMapper: ```csharp // assuming source is ISource, create a new target instance @@ -93,7 +93,7 @@ The constructor function is used whenever the mapper is asked to create a target In other words, `umbracoMapper.Map(source)` will first run the construction function, and then the mapping action. On the other hand, `umbracoMapper.Map(source, target)` where target already exists, would only run the mapping action. -The UmbracoMapper class provides various overloads of the Define method: +The UmbracoMapper class provides multiple overloads of the Define method: - An overload accepting a constructor function and a mapping action, as presented above. - An overload accepting a mapping action only, which tells the mapper how to map to an existing target (but the mapper will not be able to create new target instances). @@ -144,7 +144,7 @@ var target = umbracoMapper.Map(source, context => ## Umbraco.Code -Umbraco.Code is an assembly which should contain various coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. +Umbraco.Code is an assembly which should contain coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. The code lives in the [Umbraco.Code repository](https://github.com/umbraco/Umbraco-Code) and the tool is available via [Nuget](https://www.nuget.org/packages/Umbraco.Code/). It is included as a development dependency in Umbraco. @@ -168,7 +168,7 @@ private static void Map(ISource source, The analyzer verifies that every publicly settable property of target is assigned a value. If a property is not assigned a value, the tool raises a build error (ie. the code will not compile). -Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that, should a new property be added to ISource, an error would be raised until the corresponding mappings are updated. +Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that an error would be raised. Should a new property be added to ISource, the corresponding mappings must be updated. It is possible to exclude some properties from the check: diff --git a/13/umbraco-cms/reference/mapping.md b/13/umbraco-cms/reference/mapping.md index 06e1bc0d967..95f372b66f5 100644 --- a/13/umbraco-cms/reference/mapping.md +++ b/13/umbraco-cms/reference/mapping.md @@ -1,14 +1,14 @@ # UmbracoMapper -Often in code there is a need to 'map' one object's properties to another type of object, and the 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. +Often in code there is a need to 'map' one object's properties to another type of object. The 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} -UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, i.e. mappings need to be hand-written. +UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code, however it is totally fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. ## Accessing the IUmbracoMapper @@ -16,7 +16,7 @@ The IUmbracoMapper is registered with Dependency Injection (DI). It can therefor ## Mapping -Mapping with the UmbracoMapper works in ways very similar to AutoMapper: +Mapping with the UmbracoMapper works in ways similar to AutoMapper: ```csharp // assuming source is ISource, create a new target instance @@ -93,7 +93,7 @@ The constructor function is used whenever the mapper is asked to create a target In other words, `umbracoMapper.Map(source)` will first run the construction function, and then the mapping action. On the other hand, `umbracoMapper.Map(source, target)` where target already exists, would only run the mapping action. -The UmbracoMapper class provides various overloads of the Define method: +The UmbracoMapper class provides multiple overloads of the Define method: - An overload accepting a constructor function and a mapping action, as presented above. - An overload accepting a mapping action only, which tells the mapper how to map to an existing target (but the mapper will not be able to create new target instances). @@ -144,7 +144,7 @@ var target = umbracoMapper.Map(source, context => ## Umbraco.Code -Umbraco.Code is an assembly which should contain various coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. +Umbraco.Code is an assembly which should contain coding utilities for Umbraco. At the moment, it contains only one Roslyn analyzer, the `MapAllAnalyzer`, which is used to help writing mapping methods. The code lives in the [Umbraco.Code repository](https://github.com/umbraco/Umbraco-Code) and the tool is available via [Nuget](https://www.nuget.org/packages/Umbraco.Code/). It is included as a development dependency in Umbraco. @@ -168,7 +168,7 @@ private static void Map(ISource source, The analyzer verifies that every publicly settable property of target is assigned a value. If a property is not assigned a value, the tool raises a build error (ie. the code will not compile). -Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that, should a new property be added to ISource, an error would be raised until the corresponding mappings are updated. +Since, contrary to AutoMapper, mapping is not implicit nor automatic, this ensures that an error would be raised. Should a new property be added to ISource, the corresponding mappings must be updated. It is possible to exclude some properties from the check: From 27e63057d84bfd17354ee6a5dc3c2c0af0fa529a Mon Sep 17 00:00:00 2001 From: Alina-Magdalena Tincas <83591955+alina-tincas@users.noreply.github.com> Date: Wed, 1 May 2024 08:24:24 +0200 Subject: [PATCH 8/9] Update 10/umbraco-cms/reference/mapping.md --- 10/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10/umbraco-cms/reference/mapping.md b/10/umbraco-cms/reference/mapping.md index c134be10b68..07c6ae1762e 100644 --- a/10/umbraco-cms/reference/mapping.md +++ b/10/umbraco-cms/reference/mapping.md @@ -7,7 +7,7 @@ meta.Title: "UmbracoMapper" Often in code there is a need to 'map' one object's properties to another type of object. The 'type of objects' are not related by inheritance or interface. (Think database layer object, passing information to a presentation layer ViewModel etc). In these circumstances, it can save time and provide consistency to consolidate the logic to map between the options into one set of 'Mapping' rules. {% hint style="info" %} -UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. +UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} From c9dba8e5d4a1380e0e8728bd087b72b60c02f704 Mon Sep 17 00:00:00 2001 From: Alina-Magdalena Tincas <83591955+alina-tincas@users.noreply.github.com> Date: Wed, 1 May 2024 08:24:30 +0200 Subject: [PATCH 9/9] Update 10/umbraco-cms/reference/mapping.md --- 10/umbraco-cms/reference/mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10/umbraco-cms/reference/mapping.md b/10/umbraco-cms/reference/mapping.md index 07c6ae1762e..b179bf3baf7 100644 --- a/10/umbraco-cms/reference/mapping.md +++ b/10/umbraco-cms/reference/mapping.md @@ -12,7 +12,7 @@ UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper b This is not to be confused with the [UmbracoMapper package by Andy Butland](https://our.umbraco.com/packages/developer-tools/umbraco-mapper) of the same name. {% endhint %} -UmbracoMapper replaced AutoMapper which was an external dependency. AutoMapper builds the mapping code dynamically, based upon mapping profiles, which are defined as C# expressions. UmbracoMapper relies on static code, that is, mappings need to be hand-written. +UmbracoMapper was originally introduced to solve some issues in the Umbraco core code. However, it is fine for anyone to use in their custom site implementations or packages as they wish. ## Accessing the IUmbracoMapper