我有一个在 v10 版本上运行的 Automapper 设置,但自从我将其更新到最新的 v11 后,它就不再工作了。我不知道可能是什么问题。源文件和目标文件都是相似的。希望可以有人帮帮我。
automapper启动时弹出的消息是
Incorrect number of arguments supplied for call to method Rig.Commercial.Reservation.Contract.V1.Generic.GeoJson.GeojsonPoint get_Item(Int32)' (Parameter 'property')
Run Code Online (Sandbox Code Playgroud)
这是我的个人资料中的地图设置:
CreateMap<GeojsonPoint, Contract.V1.Generic.GeoJson.GeojsonPoint>().ReverseMap();
对象:
来源
/// <summary>Geojson Coordinate</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v13.0.0.0)")]
public partial class GeojsonPoint : System.Collections.ObjectModel.Collection<double>
{
}
Run Code Online (Sandbox Code Playgroud)
目的地
/// <summary>
/// GeoJson coordinate
/// </summary>
[GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")]
public class GeojsonPoint : Collection<double>
{
}
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪
at System.Linq.Expressions.Expression.Property(Expression expression, PropertyInfo property)
at AutoMapper.Execution.TypeMapPlanBuilder.CreatePropertyMapFunc(MemberMap memberMap, Expression destination, MemberInfo destinationMember)
at AutoMapper.Execution.TypeMapPlanBuilder.CreateAssignmentFunc(Expression createDestination)
at AutoMapper.Execution.TypeMapPlanBuilder.CreateMapperLambda(HashSet`1 typeMapsPath)
at …Run Code Online (Sandbox Code Playgroud) 我有一个使用 Swagger 作为 API 文档的 C# Web API。我使用过 Swashbuckle 软件包。swagger 环境正在使用我在控制器中指定的多个版本。
今天我介绍了一个仍在开发中的新的未来版本 (1.2)。我想默认在 1.1 版本上打开 swagger,但仍然在右上角的下拉列表中保持正确的排序顺序(例如 v1、v1.1、v1.2)。目前它总是在下拉列表中打开顶级版本。
有人知道如何做到这一点吗?
目前我正在使用相机来检测标记.我使用opencv和Aruco Libary.
我现在才遇到问题.我需要检测2标记之间的距离是否小于特定值.我有一个计算距离的功能,我可以比较一切.但我正在寻找最有效的方法来跟踪所有标记(大约5/6)以及它们在一起的距离.
有一个带标记的列表,但我找不到比较所有标记的有效方法.
我有一个
Vector <Marker>
Run Code Online (Sandbox Code Playgroud)
我也有一个叫做的函数getDistance.
double getDistance(cv::Point2f punt1, cv::Point2f punt2)
{
float xd = punt2.x-punt1.x;
float yd = punt2.y-punt1.y;
double Distance = sqrtf(xd*xd + yd*yd);
return Distance;
}
Run Code Online (Sandbox Code Playgroud)
在Marker小号包含一个Point2f,这样我就可以轻松地对它们进行比较.
我目前遇到了Beaglebone黑色的GPIO引脚问题。
我正在寻找一种从C中的GPIO引脚p8_4读取值的正确方法。如果我正确理解的话,我尝试使用一个库,该库从引入设备树之前一直使用一种不支持的旧方法。
我试图找到解决问题的其他方法,但似乎找不到。有没有人能让我在C的正确轨道上前进?
c# ×2
.net ×1
.net-6.0 ×1
aruco ×1
asp.net-core ×1
automapper ×1
c ×1
c++ ×1
device ×1
gpio ×1
opencv ×1
performance ×1
swagger ×1
swashbuckle ×1
tree ×1
vector ×1