public static object QuickEmit(YamlCallSiteStorage /*!*/ siteStorage, [NotNull] BlockParam /*!*/ block, RubyModule /*!*/ self, object objectId, [NotNull] Hash /*!*/ opts) { // TODO: load from opts YamlOptions cfg = YamlOptions.DefaultOptions; MutableStringWriter writer = new MutableStringWriter(MutableString.CreateMutable(RubyEncoding.Binary)); Serializer s = new Serializer(writer, cfg); RubyRepresenter rep = new RubyRepresenter(siteStorage); object result; if (block.Yield(new Syck.Out(rep), out result)) { return(result); } s.Serialize(rep.ToNode(result)); s.Close(); return(writer.String); }
public static object DumpAll(YamlCallSiteStorage/*!*/ siteStorage, RubyModule/*!*/ self, [NotNull]IList/*!*/ objs, [Optional]RubyIO io) { return DumpAll(siteStorage, objs, io); }
public static object Dump(YamlCallSiteStorage/*!*/ siteStorage, RubyModule/*!*/ self, object obj, [Optional]RubyIO io) { return DumpAll(siteStorage, new object[] { obj }, io); }
public static object ToYaml(YamlCallSiteStorage /*!*/ siteStorage, object self, [DefaultParameterValue(null)] object options) { return(RubyYaml.DumpAll(siteStorage, new object[] { self }, null)); }
internal RubyRepresenter(YamlCallSiteStorage/*!*/ siteStorage) { _siteStorage = siteStorage; }
public static object Emit(YamlCallSiteStorage /*!*/ siteStorage, YamlStream /*!*/ self, [Optional] RubyIO io) { return(RubyYaml.DumpAll(siteStorage, self._documents, io)); }
public static object DumpAll(YamlCallSiteStorage /*!*/ siteStorage, RubyModule /*!*/ self, [NotNull] IList /*!*/ objs, [Optional] RubyIO io) { return(DumpAll(siteStorage, objs, io)); }
public static RubyRepresenter/*!*/ CreateEmitter(YamlCallSiteStorage/*!*/ siteStorage, RubyModule/*!*/ self) { return new RubyRepresenter(siteStorage); }
public static void Add(YamlCallSiteStorage /*!*/ siteStorage, SequenceNode /*!*/ self, object value) { RubyRepresenter rep = new RubyRepresenter(siteStorage); self.Nodes.Add(rep.RepresentItem(value)); }
public static void Add(YamlCallSiteStorage /*!*/ siteStorage, MappingNode /*!*/ self, object key, object value) { RubyRepresenter rep = new RubyRepresenter(siteStorage); self.Nodes.Add(rep.RepresentItem(key), rep.RepresentItem(value)); }
internal RubyRepresenter(YamlCallSiteStorage /*!*/ siteStorage) { _siteStorage = siteStorage; }
public static object ToYaml(YamlCallSiteStorage/*!*/ siteStorage, object self, [DefaultParameterValue(null)]object options) { return RubyYaml.DumpAll(siteStorage, new object[] { self }, null); }
public static RubyRepresenter /*!*/ CreateEmitter(YamlCallSiteStorage /*!*/ siteStorage, RubyModule /*!*/ self) { return(new RubyRepresenter(siteStorage)); }
internal static object DumpAll(YamlCallSiteStorage /*!*/ siteStorage, IEnumerable /*!*/ objs, RubyIO io) { return(DumpAll(new RubyRepresenter(siteStorage), objs, io)); }
internal static object DumpAll(YamlCallSiteStorage/*!*/ siteStorage, IEnumerable/*!*/ objs, RubyIO io) { return DumpAll(new RubyRepresenter(siteStorage), objs, io); }
public static void Add(YamlCallSiteStorage/*!*/ siteStorage, MappingNode/*!*/ self, object key, object value) { RubyRepresenter rep = new RubyRepresenter(siteStorage); self.Nodes.Add(rep.RepresentItem(key), rep.RepresentItem(value)); }
public static object QuickEmit(YamlCallSiteStorage/*!*/ siteStorage, [NotNull]BlockParam/*!*/ block, RubyModule/*!*/ self, object objectId, [NotNull]Hash/*!*/ opts) { // TODO: load from opts YamlOptions cfg = YamlOptions.DefaultOptions; MutableStringWriter writer = new MutableStringWriter(MutableString.CreateMutable(RubyEncoding.Binary)); Serializer s = new Serializer(writer, cfg); RubyRepresenter rep = new RubyRepresenter(siteStorage); object result; if (block.Yield(new Syck.Out(rep), out result)) { return result; } s.Serialize(rep.ToNode(result)); s.Close(); return writer.String; }
public static void Add(YamlCallSiteStorage/*!*/ siteStorage, SequenceNode/*!*/ self, object value) { RubyRepresenter rep = new RubyRepresenter(siteStorage); self.Nodes.Add(rep.RepresentItem(value)); }
public static object Emit(YamlCallSiteStorage/*!*/ siteStorage, YamlStream/*!*/ self, [Optional]RubyIO io) { return RubyYaml.DumpAll(siteStorage, self._documents, io); }
public static object Dump(YamlCallSiteStorage /*!*/ siteStorage, RubyModule /*!*/ self, object obj, [Optional] RubyIO io) { return(DumpAll(siteStorage, new object[] { obj }, io)); }