/// <summary> /// Constructor method for creating <see cref="BasicRestCaller"/> with <paramref name="parameters"/>. /// </summary> /// /// <param name="parameters">The <see cref="Parameters"/>.</param> public BasicRestCaller(RestCallerParameters parameters) { if (parameters == null) { LOGGER.ErrorFormat(string.Format(Constants.CANNOT_BE_NULL_ERROR_MESSAGE_FORMAT, ObjectMetadata.GetMemberName(() => parameters))); throw new ArgumentException(string.Format(Constants.CANNOT_BE_NULL_ERROR_MESSAGE_FORMAT, ObjectMetadata.GetMemberName(() => parameters))); } Parameters = parameters; Parameters.ServerCaller.Callers.Add(this); }
/// <summary> /// Constructor method for creating <see cref="ServerCaller"/> with <paramref name="serverCallerParameters"/>. /// </summary> /// /// <param name="serverCallerParameters">The <see cref="ServerCallerParameters"/>.</param> public ServerCaller(ServerCallerParameters serverCallerParameters) { if (serverCallerParameters == null) { LOGGER.ErrorFormat(string.Format(Constants.CANNOT_BE_NULL_ERROR_MESSAGE_FORMAT, ObjectMetadata.GetMemberName(() => serverCallerParameters))); throw new ArgumentException(string.Format(Constants.CANNOT_BE_NULL_ERROR_MESSAGE_FORMAT, ObjectMetadata.GetMemberName(() => serverCallerParameters))); } var restCallerParameters = new RestCallerParameters(this, serverCallerParameters.BaseServerUrl, serverCallerParameters.AccessToken, serverCallerParameters.Canal); Callers = new List <BasicRestCaller>(); OAuth = new OAuthRestCaller(restCallerParameters); Event = new EventRestCaller(restCallerParameters); Customer = new CustomerRestCaller(restCallerParameters); }