Пример #1
0
        public void Collect(Definition definition, Quantity quantity)
        {
            if (definition.ParamType != Conformance.SearchParamType.Quantity)
                return;
 
            Quantity q = quantity.Standardize();
            string system = (quantity.System != null) ? quantity.System.ToString() : null;
            
            BsonDocument block = new BsonDocument()
                {
                    { "system", system },
                    { "value", q.GetValueAsBson() },
                    { "decimals", q.GetDecimalSearchableValue() },
                    { "unit", q.Units }
                };
            Write(definition.ParamName, block); 
        }