MapsterMapper/Mapster

Is there going to be a [MaxDepth] attribute?

Aperta

#550 aperta il 22 feb 2023

 (1 commento) (0 reazioni) (0 assegnatari)C# (312 fork)batch import
good first issueimprovementopen for PR

Metriche repository

Star
 (3995 stelle)
Metriche merge PR
 (Merge medio 12g 15h) (10 PR mergiate in 30 g)

Descrizione

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[]
}

Guida contributor