public void Initialize(bool pollingMode, bool userTypeMode, ProtocolType type) { this.pollingMode = pollingMode; this.userTypeMode = userTypeMode; this.type = type; MySerializer.GetInstance().Initialize(userTypeMode); msgDelegateInitializer = new MessageDelegateInitializer(); msgDelegateProcessor = new MessageDelegateProcessor(msgDelegateInitializer); messageInitializer = new ClientHelperMessageInitializer(); networkInitializer = new ClientHelperNetworkInitializer(messageInitializer, msgDelegateProcessor, type); }
public void Initialize(bool pollingMode, bool userTypeMode, ProtocolType type, Action <String> logger, IMessageHandler disconnectHandler) { this.pollingMode = pollingMode; this.userTypeMode = userTypeMode; this.type = type; this.logger = logger; MySerializer.GetInstance().Initialize(userTypeMode); msgDelegateInitializer = new MessageDelegateInitializer(); msgDelegateProcessor = new MessageDelegateProcessor(msgDelegateInitializer); messageInitializer = new ClientHelperMessageInitializer(this); messageInitializer.SetConnectionInactiveHandler(disconnectHandler); networkInitializer = new ClientHelperNetworkInitializer(messageInitializer, msgDelegateProcessor); SetOnConnectAuthRes(); }