示例#1
0
        public override void WriteJavascript(JavascriptTextWriter writer, VueComputed value, JsonSerializer serializer)
        {
            writer.WriteStartJsMember(value.Name);
            writer.WriteStartJsObject();

            var declaration  = value.Body.Members.First() as PropertyDeclarationSyntax;
            var syntaxWriter = new JavascriptSyntaxWriter(writer);

            foreach (var accessor in declaration.AccessorList.Accessors)
            {
                syntaxWriter.Visit(accessor);
            }
            writer.WriteEndJsObject();
            writer.WriteEndJsMember();
        }
示例#2
0
        public override void WriteJavascript(JavascriptTextWriter writer, VueMethod value, JsonSerializer serializer)
        {
            var syntaxWalker = new JavascriptSyntaxWriter(writer);

            syntaxWalker.Visit(value.Declaration);
        }