public JerseyDTO(jersey item) { Guard.Argument(item, nameof(item)).NotNull(); BaseColor = item.@base; Number = item.number; SleeveColor = item.sleeve; Type = item.type; HorizontalStripes = item.horizontal_stripesSpecified ? (bool?)item.horizontal_stripes : null; Split = item.splitSpecified ? (bool?)item.split : null; Squares = item.squaresSpecified ? (bool?)item.squares : null; Stripes = item.stripesSpecified ? (bool?)item.stripes : null; StripesColor = item.stripes_color; SplitColor = item.split_color; ShirtType = item.shirt_type; SleeveDetail = item.sleeve_detail; }
public JerseyDTO(jersey item) { Contract.Requires(item != null); BaseColor = item.@base; Number = item.number; SleeveColor = item.sleeve; Type = item.type; HorizontalStripes = item.horizontal_stripesSpecified ? (bool?)item.horizontal_stripes : null; Split = item.splitSpecified ? (bool?)item.split : null; Squares = item.squaresSpecified ? (bool?)item.squares : null; Stripes = item.stripesSpecified ? (bool?)item.stripes : null; StripesColor = item.stripes_color; SplitColor = item.split_color; ShirtType = item.shirt_type; SleeveDetail = item.sleeve_detail; }