Beispiel #1
0
        static LegacyDb4oAssemblyNameMapper()
        {
            LatinStringIO stringIO = new UnicodeStringIO();

            oldAssemblies = new byte[oldAssemblyNames.Length][];
            for (int i = 0; i < oldAssemblyNames.Length; i++)
            {
                oldAssemblies[i] = stringIO.Write(oldAssemblyNames[i]);
            }
        }
Beispiel #2
0
        private static byte[] UpdateInternalClassName(byte[] bytes, int candidateMatchingAssemblyIndex)
        {
            UnicodeStringIO io      = new UnicodeStringIO();
            string          typeFQN = io.Read(bytes);

            string[] assemblyNameParts = typeFQN.Split(',');
            if (assemblyNameParts[1].Trim() != oldAssemblyNames[candidateMatchingAssemblyIndex])
            {
                return(bytes);
            }

            string typeName = assemblyNameParts[0];

            return(io.Write(FullyQualifiedNameFor(typeName).ToString()));
        }
Beispiel #3
0
        /// <exception cref="Db4objects.Db4o.Ext.InvalidPasswordException"></exception>
        private void LoginToServer(Socket4Adapter iSocket)
        {
            UnicodeStringIO stringWriter = new UnicodeStringIO();
            int             length       = stringWriter.Length(_userName) + stringWriter.Length(_password);
            MsgD            message      = Msg.Login.GetWriterForLength(SystemTransaction(), length);

            message.WriteString(_userName);
            message.WriteString(_password);
            message.Write(iSocket);
            Msg             msg     = ReadLoginMessage(iSocket);
            ByteArrayBuffer payLoad = msg.PayLoad();

            BlockSize(payLoad.ReadInt());
            int doEncrypt = payLoad.ReadInt();

            if (doEncrypt == 0)
            {
                _handlers.OldEncryptionOff();
            }
            if (payLoad.RemainingByteCount() > 0)
            {
                _serverSideID = payLoad.ReadInt();
            }
        }