/// <summary> /// Initializes a new instance of the <see cref="BookmakerDetailsDTO"/> class /// </summary> /// <param name="msg">The MSG</param> /// <param name="serverTimeDifference">The server time difference</param> public BookmakerDetailsDTO(bookmaker_details msg, TimeSpan serverTimeDifference) { Guard.Argument(msg, nameof(msg)).NotNull(); Id = msg.bookmaker_id; VirtualHost = msg.virtual_host; Expires = msg.expire_atSpecified ? (DateTime?)msg.expire_at : null; ResponseCode = RestMapperHelper.MapResponseCode(msg.response_code, msg.response_codeSpecified); Message = msg.message; ServerTimeDifference = serverTimeDifference; }
/// <summary> /// Initializes a new instance of the <see cref="BookmakerDetailsDTO" /> class /// </summary> /// <param name="msg">The MSG</param> /// <param name="serverTimeDifference">The server time difference</param> public BookmakerDetailsDTO(bookmaker_details msg, TimeSpan serverTimeDifference) { Contract.Requires(msg != null); Id = msg.bookmaker_id; VirtualHost = msg.virtual_host; Expires = msg.expire_atSpecified ? (DateTime?)msg.expire_at : null; ResponseCode = RestMapperHelper.MapResponseCode(msg.response_code, msg.response_codeSpecified); Message = msg.message; ServerTimeDifference = serverTimeDifference; }