예제 #1
0
        protected override void InternalSelect(IRow row)
        {
            // TODO: Will column order in this row always be guaranteed... if so we could avoid the lookup, but...
            // Return a row containing the values for the current resource in the bundle
            var resource = _resources[_currentIndex];

            for (int index = 0; index < row.DataType.Columns.Count; index++)
            {
                var value = ObjectMarshal.ToNativeOf(Program.ValueManager, row.DataType.Columns[index].DataType, _fhirResourceType.GetProperty(row.DataType.Columns[index].Name).GetValue(resource, null));
                row[index] = value;
            }
        }
예제 #2
0
        public override object InternalExecute(Program program)
        {
            var instance = Nodes[0].Execute(program);

                        #if NILPROPOGATION
            if (instance == null)
            {
                return(null);
            }
                        #endif

            var property = instance.GetType().GetProperty(PropertyName);

            var result = ObjectMarshal.GetHostProperty(instance, property);

            return(ObjectMarshal.ToNativeOf(program.ValueManager, DataType, result));
        }