public Maybe <PropertyValue> Read(NID[] nodePath, int rowId, PropertyTag propertyTag)
        {
            var rowIndex = rowIndexReader.GetRowIndex(nodePath, rowId);

            if (rowIndex.HasNoValue)
            {
                return(Maybe <PropertyValue> .NoValue());
            }

            var row = rowMatrixReader.GetRow(nodePath, rowIndex.Value);

            if (row.HasNoValue)
            {
                return(Maybe <PropertyValue> .NoValue());
            }

            if (!row.Value.Values.ContainsKey(propertyTag.Value))
            {
                return(Maybe <PropertyValue> .NoValue());
            }

            var propertyValue = row.Value.Values[propertyTag.Value];

            return(propertyValueReader.Read(nodePath, propertyTag.Type, propertyValue));
        }
Example #2
0
        public Maybe <PropertyValue> Read(NID[] nodePath, PropertyTag propertyTag)
        {
            var dataRecord = bthReader.ReadDataRecord(nodePath, propertyTag.Id);

            if (dataRecord.HasNoValue)
            {
                return(Maybe <PropertyValue> .NoValue());
            }

            return(propertyValueReader.Read(nodePath, propertyTag.Type, dataRecord.Value.Data.Take(2, 4)));
        }