/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
        /// <exception cref="Db4objects.Db4o.Ext.OldFormatException"></exception>
        /// <exception cref="Db4objects.Db4o.Ext.InvalidPasswordException"></exception>
        public virtual IObjectContainer OpenClient(IConfiguration config, string hostName
                                                   , int port, string user, string password)
        {
            if (user == null || password == null)
            {
                throw new InvalidPasswordException();
            }
            Config4Impl.AssertIsNotTainted(config);
            var clientConfig = Db4oClientServerLegacyConfigurationBridge.AsClientConfiguration
                                   (config);
            var networkSocket = new Socket4Adapter(clientConfig.Networking.SocketFactory
                                                   , hostName, port);

            return(new ClientObjectContainer(clientConfig, networkSocket, user, password, true
                                             ));
        }
Exemplo n.º 2
0
 private Config4Impl AsLegacy(object config)
 {
     return(Db4oClientServerLegacyConfigurationBridge.AsLegacy(config));
 }