Automapper Mapper.DynamicMap(....) - automapper

Mapper.DynamicMap(object, source, destination) is deprecated in the latest version of Automapper.
What is the alternative of this method when the source and destination values are not known until runtime?

I found the answer. It was all put into one method:
Mapper.Map(object, source, destination)

Related

What is the JournalArticle setContent(java.lang.String content) replacement in 7.4?

I am currently upgrading a module that uses setContent(), that used to be available for JournalArticle (package com.liferay.journal.model) in 7.3.
I checked the guidelines at:
https://learn.liferay.com/dxp/latest/en/liferay-internals/reference/7-4-breaking-changes.html
But I could not find a direct replacement, or anything about its removal.
Did I miss something in the breaking changes documentation?
I also checked the github repository, and the method that was on 7.3.x does not seem to be present in 7.4.x.
This is one of the classes I checked when I first noticed the method was gone:
https://github.com/liferay/liferay-portal/blob/7.4.x/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/model/impl/JournalArticleModelImpl.java
I also checked the public api at for JournalArticles, as in:
https://github.com/liferay/liferay-portal/blob/7.4.x/modules/apps/journal/journal-api/src/main/java/com/liferay/journal/model/JournalArticleModel.java
https://github.com/liferay/liferay-portal/blob/7.4.x/modules/apps/journal/journal-api/src/main/java/com/liferay/journal/model/JournalArticle.java

Why SoftwarePackage don't have version?

In the [SWS_UCM_00039]SwPackageInfoType having property Version in the SWS_UpdateAndConfigManagement.
But there is no such property defined in the Manifest TPS.
BTW. For my understanding, the struct in SWS basically match the ARXML Manifest.
Because the data is read from it.
So as Manifest doesn't contains the SoftwarePakcage's version, where shall I get it?
And the most weird is SwPackageInfoType having Name SwInfoName, but the Description of SwInfoName is SoftwareCluster name...
There only one SWCL in the software package.
So the version of SwPackageInfoType means the SWCL's version.
SoftwarePackage describes how SWCL shall be installed, and SWCL is part of it.
BTW In the comment of the question:
There are many SoftwareCluster under SoftwarePackage
that is wrong.
SoftwareCluster have ROOT and SUB hierarchy, one SWCL may have many children. But for software package will not have the relationship.

Does not recognize Add Collection Mappers from automapper.collection

I try to use automapper.collection but in the Mapper.Initialize method the AddCollectionMappers method is not recognized
I'm using .net 4.7, automapper 6.1.1, automapper.collection 3.1.1
Thank you.
enter image description here
Try adding using statement:
using AutoMapper.EquivalencyExpression;

Attribute Resolution in Chef

I'm using a chef community cookbook that downloads, installs, a configures an SDK. (Let's call it the blah-sdk.) You just include_recipe 'blah-sdk' and viola, it's installed. It has an attribute specifying the version of the blah-sdk it will install. This version attribute in turn is used to form the value of a corresponding 'download_url' attribute. In theory I should be able to set the value of version attribute to something else in the cookbook where I include the blah-sdk. But there is a problem. The download_url attribute gets set (using the default version specified in the blah-sdk cookbook) before my override version attribute does. So the wrong url is used to retrieve the default version rather than the version I want. I could set the download_url in my cookbook as well, but that breaks the encapsulation of the 'blah-sdk' cookbook. I also might end up playing whack-a-mole experimentally with some long stream of attributes before getting it to work. There has got to be a better way. What is it?
cookbooks/blah-sdk/attributes/default.rb:
default['blah']['version'] = '24.4'
default['blah']['download_url'] = "http://dl.company.com/blah/blah-sdk_r#{node['blah']['version']}-linux.tgz"
cookbooks/blah-sdk/recipes/default.rb:
...
print("blah version: #{node['blah']['version']}")
print("blah download_url: #{node['blah']['download_url']}")
...
cookbooks/my_cookbook/attributes/default.rb:
normal['blah']['version'] = '24.4.1'
(I've also tried using default, force_default, override, and force_override. Made no difference.)
cookbooks/my_cookbook/recipes/default.rb
...
include_recipe 'blah-sdk'
...
Output:
==> default: blah version: 24.4.1
==> default: blah download_url: http://dl.company.com/blah/blah-sdk_r24.4-linux.tgz
Code demonstrating the issue and coderanger's suggested solution (if you can fix the third party cookbook):
https://github.com/marc-swingler/stackoverflow_question
Not the best solution, but due to the order in which attributes are loaded, dropping the version into a role or environment works too.
https://christinemdraper.wordpress.com/2014/10/06/avoiding-the-possible-pitfalls-of-derived-attributes/
See https://coderanger.net/derived-attributes/ for an overview of this problem. There is no good solution that doesn't involve modifying the upstream cookbook. Easiest solution is to duplicate the derived attribute in your wrapper as well.

Source code required for AutoMapper version 1.0.0.155

I need source code for AutoMapper version 1.0.0.155
It would be helpful if you can share links from where it can be downloded.
Thanks in advance.
Here is v1.0.zip — Version 1.0. It has revision version 155 as you mentioned.

Resources