You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the objectMapping.SetOrderBy() Method to get everything sorted alphabetically (including the discriminator), but unfortunately I can't apply the solution you provided right here #46 as I am using it this way:
public class DsonObjectMappingConventionProvider : IObjectMappingConventionProvider
{
private readonly IObjectMappingConvention _objectMappingConvention;
public DsonObjectMappingConventionProvider(OutputMode mode)
{
_objectMappingConvention = new DsonObjectMappingConvention(mode);
}
public IObjectMappingConvention GetConvention(Type type)
{
return _objectMappingConvention;
}
}
and:
public class DsonObjectMappingConvention : IObjectMappingConvention
{
....
public void Apply<T>(SerializationRegistry registry, ObjectMapping<T> objectMapping) where T : class
{
....
objectMapping.SetOrderBy(m => m.MemberName);
}
}
I think the problem is that at the time where Apply(...) is executed the MemberNames are all null and cannot be sorted? What am I doing wrong?
The text was updated successfully, but these errors were encountered:
First, thanks for implementing this!
I am trying to use the objectMapping.SetOrderBy() Method to get everything sorted alphabetically (including the discriminator), but unfortunately I can't apply the solution you provided right here #46 as I am using it this way:
on inititalization:
with:
and:
I think the problem is that at the time where Apply(...) is executed the MemberNames are all null and cannot be sorted? What am I doing wrong?
The text was updated successfully, but these errors were encountered: