public SnipeCommunicatorRequest(SnipeCommunicator communicator, string message_type = null) { mCommunicator = communicator; MessageType = message_type; if (mCommunicator != null) { mCommunicator.Requests.Add(this); } }
public void Dispose() { if (mCommunicator != null) { if (mCommunicator.Requests != null) { mCommunicator.Requests.Remove(this); } mCommunicator.LoginSucceeded -= OnCommunicatorReady; mCommunicator.ConnectionSucceeded -= OnCommunicatorReady; mCommunicator.ConnectionFailed -= OnConnectionClosed; mCommunicator.MessageReceived -= OnMessageReceived; mCommunicator = null; } mCallback = null; mWaitingForResponse = false; }
internal SnipeApiBase(SnipeCommunicator communicator) { this.Communicator = communicator; }