public static Node /*!*/ ToYaml(UnaryOpStorage /*!*/ beginStorage, UnaryOpStorage /*!*/ endStorage, UnaryOpStorage /*!*/ exclStorage, Range /*!*/ self, [NotNull] RubyRepresenter /*!*/ rep) { var begin = beginStorage.GetCallSite("begin"); var end = endStorage.GetCallSite("end"); var map = new Dictionary <object, object>(); rep.AddYamlProperties(map, self, false); return(rep.Map( new Dictionary <Node, Node> { { rep.Scalar(null, "begin", ScalarQuotingStyle.None), rep.RepresentItem(begin.Target(begin, self)) }, { rep.Scalar(null, "end", ScalarQuotingStyle.None), rep.RepresentItem(end.Target(end, self)) }, { rep.Scalar(null, "excl", ScalarQuotingStyle.None), rep.Scalar(self.ExcludeEnd) }, }, rep.GetTagUri(self), map, FlowStyle.Block )); }
public static Node ToYamlNode(UnaryOpStorage /*!*/ messageStorage, Exception /*!*/ self, [NotNull] RubyRepresenter /*!*/ rep) { var site = messageStorage.GetCallSite("message", 0); var map = new Dictionary <object, object>(); rep.AddYamlProperties(map, self, false); return(rep.Map( new Dictionary <Node, Node> { { rep.Scalar(null, "message", ScalarQuotingStyle.None), rep.RepresentItem(site.Target(site, self)) } }, rep.GetTagUri(self), map, FlowStyle.Block )); }
public static Node /*!*/ ToYamlNode(RubyStruct /*!*/ self, [NotNull] RubyRepresenter /*!*/ rep) { var fieldNames = self.GetNames(); var fields = new Dictionary <Node, Node>(fieldNames.Count); for (int i = 0; i < fieldNames.Count; i++) { fields[rep.Scalar(null, fieldNames[i], ScalarQuotingStyle.None)] = rep.RepresentItem(self.Values[i]); } var map = new Dictionary <object, object>(); rep.AddYamlProperties(map, self, false); return(rep.Map(fields, rep.GetTagUri(self), map, FlowStyle.Block)); }
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)); }
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)); }