public void SetConnectionSettings(IConnectionSettings contractObject)
        {
            var connectionSettings = ConnectionSettings.Create(contractObject);

            lock (Anchor)
            {
                bool changed = false;

                if (!connectionSettings.Equals(_authenticationSettings.ConnectionSettings))
                {
                    _authenticationSettings.ConnectionSettings =
                        (IConnectionSettings)connectionSettings.Clone();
                    changed = true;
                }

                if (changed)
                {
                    Save();
                }
            }

            if (HasConnectionSettings)
            {
                IdentifierService.RegisterMasterIdentifierIfNeeded(this);
            }
        }
        public void Handshake(ISession session)
        {
            if (null == session)
            {
                throw new ArgumentNullException(nameof(session));
            }

            if (session.AuthenticationService.HasConnectionSettings)
            {
                UpdateDatabase(session.AuthenticationService.GetConnectionSettings());
                IdentifierService.RegisterMasterIdentifierIfNeeded(session.AuthenticationService);
            }
        }