From: Clayton H. <dr...@us...> - 2005-01-02 22:21:53
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15897/src/ICSharpCode/SharpCvsLib/Responses Modified Files: MessageResponse.cs ResponseMessageEvents.cs Log Message: Implemented the Status commandline, fixed bug in the StatusCommand library component. Added documentation on the requests/ responses from the status command. Index: MessageResponse.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses/MessageResponse.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MessageResponse.cs 5 Aug 2004 07:58:42 -0000 1.9 --- MessageResponse.cs 2 Jan 2005 22:21:39 -0000 1.10 *************** *** 39,70 **** namespace ICSharpCode.SharpCvsLib.Responses { - /// <summary> - /// Message response. - /// </summary> - public class MessageResponse : AbstractResponse { - private bool terminating; - private readonly ILog LOGGER = - LogManager.GetLogger (typeof (MessageResponse)); - /// <summary> ! /// Process the message response. /// </summary> ! public override void Process() { ! string message = this.ReadLine(); ! terminating = message.Trim().ToUpper() == "OK"; ! // Fire message event to the client app ! Services.SendMessage("cvs server: M " + message); ! String msg = "cvs server: M " + message; ! LOGGER.Debug (msg); ! } ! /// <summary> ! /// Indicator stating whether the response is terminating or not. ! /// </summary> ! public override bool IsTerminating { ! get {return terminating;} } } - } --- 39,71 ---- namespace ICSharpCode.SharpCvsLib.Responses { /// <summary> ! /// Message response. /// </summary> ! public class MessageResponse : AbstractResponse { ! private bool terminating; ! private readonly ILog LOGGER = ! LogManager.GetLogger (typeof (MessageResponse)); ! /// <summary> ! /// Process the message response. ! /// </summary> ! public override void Process() { ! string message = this.ReadLine(); ! terminating = message.Trim().ToUpper() == "OK"; ! // Fire message event to the client app ! Services.SendMessage("cvs server: M " + message); ! String msg = "cvs server: M " + message; ! LOGGER.Debug (msg); ! Services.ResponseMessageEvents.SendResponseMessage(msg, this.GetType()); ! } ! ! /// <summary> ! /// Indicator stating whether the response is terminating or not. ! /// </summary> ! public override bool IsTerminating { ! get {return terminating;} ! } } } Index: ResponseMessageEvents.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses/ResponseMessageEvents.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ResponseMessageEvents.cs 28 Oct 2004 06:42:23 -0000 1.5 --- ResponseMessageEvents.cs 2 Jan 2005 22:21:39 -0000 1.6 *************** *** 76,79 **** --- 76,84 ---- /// <summary> + /// Listen for generic message events from the server. + /// </summary> + public event MessageEventHandler MessageResponseMessageEvent; + + /// <summary> /// Default constructor. /// </summary> *************** *** 115,119 **** this.ListResponseMessageEvent(this, new MessageEventArgs(message, MessageEventArgs.EMPTY_PREFIX)); } ! } else { if (null != this.UnspecifiedResponseMessageEvent) { this.UnspecifiedResponseMessageEvent(this, new MessageEventArgs(message, MessageEventArgs.DEFAULT_PREFIX)); --- 120,129 ---- this.ListResponseMessageEvent(this, new MessageEventArgs(message, MessageEventArgs.EMPTY_PREFIX)); } ! } else if (responseType == typeof(MessageResponse)) { ! if (null != MessageResponseMessageEvent) { ! this.MessageResponseMessageEvent(this, new MessageEventArgs(message, MessageEventArgs.EMPTY_PREFIX)); ! } ! } ! else { if (null != this.UnspecifiedResponseMessageEvent) { this.UnspecifiedResponseMessageEvent(this, new MessageEventArgs(message, MessageEventArgs.DEFAULT_PREFIX)); |