/// <summary> /// Initializes a new instance of the <see cref="JsonFieldSelectorBuilder{TRoot}"/> class. /// </summary> /// <param name="partNameExtractor">The <see cref="IPartNameExtractor"/> that extracts the name of the part from the <see cref="PropertyInfo"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="partNameExtractor"/>' cannot be null. </exception> public JsonFieldSelectorBuilder([NotNull] IPartNameExtractor partNameExtractor) { if (partNameExtractor == null) { throw new ArgumentNullException(nameof(partNameExtractor)); } this.partNameExtractor = partNameExtractor; }
/// <summary> /// Initializes a new instance of the <see cref="FieldSelectorTreeCreator{TRoot}"/> class. /// </summary> /// <param name="partNameExtractor">An implementation of the <see cref="IPartNameExtractor"/> interface which extracts the name of the part from the <see cref="PropertyInfo"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="partNameExtractor"/>' cannot be null. </exception> public FieldSelectorTreeCreator([NotNull] IPartNameExtractor partNameExtractor) { if (partNameExtractor == null) { throw new ArgumentNullException(nameof(partNameExtractor)); } this.partNameExtractor = partNameExtractor; }
public static JsonFieldSelectorBuilder <TResource> CreateFieldSelector <TResource>( [NotNull] IPartNameExtractor partNameExtractor) { if (partNameExtractor == null) { throw new ArgumentNullException(nameof(partNameExtractor)); } return(new JsonFieldSelectorBuilder <TResource>(partNameExtractor)); }
public static JsonFieldSelectorBuilder <TRoot> CreateFieldSelector <TRoot>([NotNull] this TRoot type, [NotNull] IPartNameExtractor partNameExtractor) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (partNameExtractor == null) { throw new ArgumentNullException(nameof(partNameExtractor)); } return(new JsonFieldSelectorBuilder <TRoot>(partNameExtractor)); }