예제 #1
0
 private static extern int CreateEventScalar(
     YamlEvent *pEvent,
     YamlString anchor,
     YamlString tag,
     YamlString value,
     int aLength,
     int aPlainImplicit,
     int aQuotedImplicit,
     YamlScalarStyle aStyle);
예제 #2
0
            private static int ParseYamlEvent(IntPtr pNativeParser, YamlEvent *pEvent)
            {
                int returnCode = 0;

                try
                {
                    var builder = parsers[pNativeParser];
                    switch (pEvent->type)
                    {
                    case YamlEventType.YAML_STREAM_START_EVENT:
                        builder.StreamStart();
                        break;

                    case YamlEventType.YAML_STREAM_END_EVENT:
                        builder.StreamEnd();
                        break;

                    case YamlEventType.YAML_DOCUMENT_START_EVENT:
                        builder.DocumentStart();
                        break;

                    case YamlEventType.YAML_DOCUMENT_END_EVENT:
                        builder.DocumentEnd();
                        break;

                    case YamlEventType.YAML_ALIAS_EVENT:
                        builder.Alias(pEvent->data.alias.anchor);
                        break;

                    case YamlEventType.YAML_SCALAR_EVENT:
                        builder.Scalar(pEvent->data.scalar.anchor, pEvent->data.scalar.tag, pEvent->data.scalar.value);
                        break;

                    case YamlEventType.YAML_SEQUENCE_START_EVENT:
                        builder.SequenceStart(pEvent->data.scalar.anchor, pEvent->data.scalar.tag);
                        break;

                    case YamlEventType.YAML_SEQUENCE_END_EVENT:
                        builder.SequenceEnd();
                        break;

                    case YamlEventType.YAML_MAPPING_START_EVENT:
                        builder.MappingStart(pEvent->data.scalar.anchor, pEvent->data.scalar.tag);
                        break;

                    case YamlEventType.YAML_MAPPING_END_EVENT:
                        builder.MappingEnd();
                        break;

                    default:
                        break;
                    }
                }
                catch
                {
                    // Don't allow exceptions to get back to unmanaged caller.
                    // Non-zero indicates an error.
                    returnCode = 1;
                }
                return(returnCode);
            }
예제 #3
0
 private static extern void DestroyEvent(YamlEvent *pEvent);
예제 #4
0
 private static extern int CreateEventAlias(YamlEvent *pEvent, YamlString alias);
예제 #5
0
 private static extern int CreateEventMappingEnd(YamlEvent *pEvent);
예제 #6
0
 private static extern int CreateEventMappingStart(
     YamlEvent *pEvent,
     YamlString anchor,
     YamlString tag,
     int aImplicit,
     YamlMappingStyle aStyle);
예제 #7
0
 private static extern int CreateEventSequenceEnd(YamlEvent *pEvent);
예제 #8
0
 private static extern int CreateEventDocumentEnd(
     YamlEvent *pEvent,
     int aImplicit);
예제 #9
0
 private static extern int CreateEventDocumentStart(
     YamlEvent *pEvent,
     YamlVersionDirective *pVersionDirective,
     YamlTagDirective *pTagDirectivesStart,
     YamlTagDirective *pTagDirectivesEnd,
     int aImplicit);
예제 #10
0
 private static extern int CreateEventStreamEnd(YamlEvent *pEvent);
예제 #11
0
 private static extern int CreateEventStreamStart(
     YamlEvent *pEvent,
     YamlEncoding aEncoding);
예제 #12
0
 private static extern int Emit(
     IntPtr pNativeEmitter,
     YamlEvent *pEvent);