/// <summary> /// Converts the response to a message suitable for logging. /// </summary> /// <param name="response">The response object.</param> /// <param name="isEnabled">if set to <c>true</c> the message is created.</param> /// <returns>The string representation of the response.</returns> public static string ToLogMessage(this WMLS_GetCapResponse response, bool isEnabled = false) { if (!_log.IsDebugEnabled && !isEnabled) { return(string.Empty); } return(string.Format( "{0}: Result: {1}; Message: {2}; XML:{4}{3}{4}", response.GetType().Name, response.Result, response.SuppMsgOut, response.CapabilitiesOut, Environment.NewLine)); }
public static bool IsSuccessful(this WMLS_GetCapResponse response) => response.Result > 0;
public static bool IsSuccessful(this WMLS_GetCapResponse response) { return(response.Result > 0); }