コード例 #1
0
        public T ReadValue(IValueReader valueReader)
        {
            var collectionRW = new CollectionRW <T>();

            valueReader.ReadArray(collectionRW);

            return(collectionRW.content);
        }
コード例 #2
0
        public void WriteValue(IValueWriter valueWriter, T value)
        {
            if (value == null)
            {
                valueWriter.DirectWrite(null);

                return;
            }

            var collectionRW = new CollectionRW <T, TValue>();

            collectionRW.Initialize(value);

            valueWriter.WriteArray(collectionRW);
        }
コード例 #3
0
        public void WriteValue(IValueWriter valueWriter, T value)
        {
            if (value is null)
            {
                valueWriter.DirectWrite(null);

                return;
            }

            var collectionRW = new CollectionRW <T>
            {
                content = value
            };

            valueWriter.WriteArray(collectionRW);
        }