private object ReadValue(object source, IValueReader reader, DataAccessContext context)
        {
            if (reader == null)
            {
                return((object)null);
            }
            if (!reader.CanRead(source, context).CanReadValue)
            {
                return((object)null);
            }
            ReadResult readResult = reader.Read(source, context);

            if (!readResult.WasValueRead)
            {
                return((object)null);
            }
            return(readResult.ReadValue);
        }
        private string Read(IValueReader valueReader, object identifierObject, PipelineStep pipelineStep, PipelineContext pipelineContext)
        {
            string result = null;
            var    logger = pipelineContext.PipelineBatchContext.Logger;

            if (!valueReader.CanRead(identifierObject, new DataAccessContext()).CanReadValue)
            {
                logger.Error("Cannot read value from identifier object. (pipeline step: {0})", pipelineStep.Name);
            }
            else
            {
                var readResult = valueReader.Read(identifierObject, new DataAccessContext());
                if (!readResult.WasValueRead)
                {
                    logger.Error("No value was read from identifier object. (pipeline step: {0})", pipelineStep.Name);
                }
                else
                {
                    result = readResult.ReadValue.ToString();
                }
            }
            return(result);
        }