Ejemplo n.º 1
0
        void CallFunc()
        {
            var api  = GatewayFactory.Create(DatabaseName, _settingsdict);
            var args = ArgWriter.Create().Put("abcdef").Out();

            byte[] result;
            var    ret = api.NativeCall("func", args, out result);
            var    rr  = ResultReader.Create(result);

            Console.WriteLine("Result={0}", rr.ReadText());
        }
Ejemplo n.º 2
0
        bool FindSupplier(string id, out Supplier[] supplier)
        {
            var api = GatewayFactory.Create(DatabaseName, _settingsdict);

            byte[] args = ArgWriter.Create().Put(id).Out();
            byte[] result;
            supplier = null;
            if (!api.NativeCall("find_supplier", args, out result))
            {
                return(false);
            }
            int n;
            var r = ResultReader.Create(result).Get(out n);

            supplier = new Supplier[n];
            for (int i = 0; i < n; ++i)
            {
                supplier[i] = new Supplier();
                r.Get(out supplier[i].SNAME).Get(out supplier[i].STATUS).Get(out supplier[i].CITY).Get(out supplier[i].Sid);
            }
            return(true);
        }