MapsterMapper/Mapster

Is there going to be a [MaxDepth] attribute?

Open

#550 opened on Feb 22, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C# (312 forks)batch import
good first issueimprovementopen for PR

Repository metrics

Stars
 (3,995 stars)
PR merge metrics
 (Avg merge 12d 15h) (10 merged PRs in 30d)

Description

Say I have a Class that has 3 Arrays of Classes on it, each has another 2 Arrays of classes on it and the final has 1 Array of class on it
And I want to get 3 deep on Class2, 2 deep on class3 and 1 deep on class4
i.e.

Class1 {
     [MaxDepth(3)]
     Class2[]
     [MaxDepth(2)]
     Class3[]
     [MaxDepth(1)]
     Class4[]
}

Class2 {
    Class5[]
    Class6[]
}

Class3 {
    Class5[]
    Class6[]
}

Class4 {
     Class5[]
     Class6[]
}

Class 5 {
    Class8[]
}

Class 6 {
    Class[9]
}

Class 7 {
    Class10[]
}

Contributor guide