Example #1
0
        internal virtual ByteArrayBuffer Val(object obj, IContext context)
        {
            if (obj is ByteArrayBuffer)
            {
                return((ByteArrayBuffer)obj);
            }
            ObjectContainerBase oc = context.Transaction().Container();

            if (obj is string)
            {
                return(WriteToBuffer((IInternalObjectContainer)oc, (string)obj));
            }
            if (obj is Slot)
            {
                Slot s = (Slot)obj;
                return(oc.DecryptedBufferByAddress(s.Address(), s.Length()));
            }
            return(null);
        }