Inheritance: IAstNode
        public void Visit(indexType node)
        {
            Debug.Assert(node.ReferenceField != null);

            _strm.WriteLine("  //{0}", FormatIndex(node, node.ReferenceField.messageType + "Header"));
            _strm.WriteLine("    {0}", FormatIndex(node, ProtoTypeString(node.ReferenceField)));
        }
        public void Visit(indexType node)
        {
            Debug.Assert(node.ReferenceField != null);

            _strm.WriteLine("  //{0}", FormatIndex(node, node.ReferenceField.messageType + "Header"));
            _strm.WriteLine("    {0}", FormatIndex(node, ProtoTypeString(node.ReferenceField)));
        }
 private static string FormatIndex(indexType node, string type)
 {
     var val = string.Format("{0} {1} {2}= {3}{4};"
         , node.ReferenceField.modifier
         , type
         , node.name
         , node.ReferenceField.id
         , (node.ReferenceField.@default != null) ? string.Format(" [default={0}]", node.ReferenceField.@default) : "");
     return val;
 }
        private static string FormatIndex(indexType node, string type)
        {
            var val = string.Format("{0} {1} {2}= {3}{4};"
                                    , node.ReferenceField.modifier
                                    , type
                                    , node.name
                                    , node.ReferenceField.id
                                    , (node.ReferenceField.@default != null) ? string.Format(" [default={0}]", node.ReferenceField.@default) : "");

            return(val);
        }