Exemplo n.º 1
0
        public FileSinkCSV(FileSinkFactory factory, string filename, bool append)
        {
            _factory  = factory;
            _filename = filename;
            _append   = append;

            _rendererOptions = new RendererMetaOptions(true, false, null, null);
            _rendererMeta    = new RendererMeta(factory.EventType, new Stack <EventTypePropertyPair>(), _rendererOptions);
            _eventShell      = EventTypeUtility.GetShellForType(factory.EventType);
        }
Exemplo n.º 2
0
        private static void RecursiveRender(
            EventBean theEvent,
            StringBuilder buf,
            int level,
            RendererMeta meta,
            RendererMetaOptions rendererOptions)
        {
            var delimiter   = "";
            var simpleProps = meta.SimpleProperties;

            foreach (var simpleProp in simpleProps)
            {
                var value = simpleProp.Getter.Get(theEvent);
                buf.Append(delimiter);
                simpleProp.Output.Render(value, buf);
                delimiter = ",";
            }

            buf.Append(NEWLINE);
        }