Beispiel #1
0
 /// <summary>
 ///     Creates and returns a <see cref="ISingleTypeMapper{T}" /> instance used to map <see cref="sportsEndpoint" />
 ///     instances to
 ///     <see cref="EntityList{SportDTO}" /> instances
 /// </summary>
 /// <param name="data">
 ///     A <see cref="sportsEndpoint" /> instance which the created <see cref="ISingleTypeMapper{T}" /> will
 ///     map
 /// </param>
 /// <returns>The constructed <see cref="ISingleTypeMapper{T}" /> instance</returns>
 public ISingleTypeMapper <EntityList <SportDTO> > CreateMapper(sportsEndpoint data)
 {
     return(SportsMapper.Create(data));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="SportsMapper"/> class.
        /// </summary>
        /// <param name="data">The <see cref="sportsEndpoint"/> instance containing data about available sports.</param>
        protected SportsMapper(sportsEndpoint data)
        {
            Guard.Argument(data, nameof(data)).NotNull();

            _data = data;
        }
 /// <summary>
 /// Constructs and returns a new instance of the <see cref="ISingleTypeMapper{T}"/> instance used to map <see cref="sportsEndpoint"/> instances
 /// to <see cref="EntityList{SportDTO}"/> instances
 /// </summary>
 /// <param name="data">A <see cref="sportsEndpoint"/> instance containing tournaments data</param>
 /// <returns>a new instance of the <see cref="ISingleTypeMapper{T}"/> instance used to map <see cref="sportsEndpoint"/> instances
 /// to <see cref="EntityList{SportDTO}"/> instances</returns>
 internal static ISingleTypeMapper <EntityList <SportDTO> > Create(sportsEndpoint data)
 {
     return(new SportsMapper(data));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="SportsMapper"/> class.
        /// </summary>
        /// <param name="data">The <see cref="sportsEndpoint"/> instance containing data about available sports.</param>
        protected SportsMapper(sportsEndpoint data)
        {
            Contract.Requires(data != null);

            _data = data;
        }