Ejemplo n.º 1
0
 private static extern void DestroyEvent(YamlEvent *pEvent);
Ejemplo n.º 2
0
 private static extern int CreateEventMappingEnd(YamlEvent* pEvent);
Ejemplo n.º 3
0
 private static extern int CreateEventAlias(YamlEvent* pEvent, YamlString alias);
Ejemplo n.º 4
0
 private static extern int CreateEventSequenceEnd(YamlEvent* pEvent);
Ejemplo n.º 5
0
 private static extern int CreateEventMappingStart(
     YamlEvent *pEvent,
     YamlString anchor,
     YamlString tag,
     int aImplicit,
     YamlMappingStyle aStyle);
Ejemplo n.º 6
0
 private static extern int CreateEventDocumentEnd(
     YamlEvent *pEvent,
     int aImplicit);
Ejemplo n.º 7
0
 private static extern int CreateEventScalar(
     YamlEvent *pEvent,
     YamlString anchor,
     YamlString tag,
     YamlString value,
     int aLength,
     int aPlainImplicit,
     int aQuotedImplicit,
     YamlScalarStyle aStyle);
Ejemplo n.º 8
0
 private static extern int CreateEventDocumentStart(
     YamlEvent *pEvent,
     YamlVersionDirective *pVersionDirective,
     YamlTagDirective *pTagDirectivesStart,
     YamlTagDirective *pTagDirectivesEnd,
     int aImplicit);
Ejemplo n.º 9
0
 private static extern int CreateEventStreamEnd(YamlEvent* pEvent);
Ejemplo n.º 10
0
 private static extern int CreateEventStreamStart(
     YamlEvent *pEvent,
     YamlEncoding aEncoding);
Ejemplo n.º 11
0
 private static extern int Emit(
     IntPtr pNativeEmitter,
     YamlEvent *pEvent);
Ejemplo n.º 12
0
 private static unsafe void GenerateEvent(IntPtr pNativeEmitter, Func<IntPtr, int> eventInit)
 {
     var @event = new YamlEvent();
     // This method is unsafe, so the @event struct is already fixed on the stack.
     // However, you can't pass unsafe types into lambdas so we have to cast to an IntPtr.
     var pEvent = &@event;
     if (0 == eventInit((IntPtr)pEvent))
     {
         throw new Exception("Failed to initialize YAML serialization event");
     }
     try
     {
         Emit(pNativeEmitter, pEvent);
     }
     finally
     {
         DestroyEvent(pEvent);
     }
 }