public override bool Equals(object o) { if (o == null) { return(false); } if (o.GetType() != typeof(ChabuSetupInfo)) { return(false); } ChabuSetupInfo c = (ChabuSetupInfo)o; if (recvPacketSize != c.recvPacketSize) { return(false); } if (applicationVersion != c.applicationVersion) { return(false); } if (applicationProtocolName == null) { return(false); } if (applicationProtocolName != c.applicationProtocolName) { return(false); } return(true); }
/// ///<summary>Create a new instance of ChabuBuilder which is used to create a IChabu instance.</summary> /// Use subsequence calls on the returned instance and as the last call #build() to get the IChabu instance. /// /// <param name="applicationVersion">the application specific version number, seen by the communication partner.</param> /// <param name="applicationProtocolName">the application specific name, seen by the communication partner.</param> /// <param name="recvPacketSize">the size of the receive buffer held in chabu. This defines the maximum size of packets received.</param> /// <param name="priorityCount">the number of priorities that is maintained by chabu. The allowed value in #addChannel is then 0 .. (_priorityCount-1)</param> /// <param name="xmitListener">Listener called, when chabu want to be notified on a write possiblitiy.</param> /// <returns>this ChabuBuilder instance. Use for fluent API style.</returns> /// public static ChabuBuilder Start(int applicationVersion, String applicationProtocolName, int recvPacketSize, int priorityCount, Runnable xmitListener) { var ci = new ChabuSetupInfo(recvPacketSize, applicationVersion, applicationProtocolName); return(new ChabuBuilder(ci, priorityCount, xmitListener)); }
private ChabuBuilder(ChabuSetupInfo localSetupInfo, int priorityCount, Runnable xmitListener) { this._localSetupInfo = localSetupInfo; this._priorityCount = priorityCount; this._xmitRequestListener = xmitListener; }
public ChabuSetupInfo(ChabuSetupInfo other) { this.recvPacketSize = other.recvPacketSize; this.applicationProtocolName = other.applicationProtocolName; this.applicationVersion = other.applicationVersion; }