Ejemplo n.º 1
0
        private void WriteSetAccessor(SetAccessorDeclaration member, bool skipBody)
        {
            if (member.HasDecorator)
            {
                WriteDecorators(member.Decorators, false);
            }
            _Writer.WriteAccessibility(member.Accessibility);
            WriteIsStatic(member.IsStatic);
            _Writer.Write("set ");
            _Writer.Write(member.PropertyName);
            _Writer.Write("(");
            _Writer.Write(member.ParameterName);
            _Writer.Write(": ");
            member.PropertyType.WriteTypeReference(_Writer);
            _Writer.Write(')');

            if (member.HasStatement)
            {
                WriteMethodBody(member.Statements);
                _Writer.WriteLine();
            }
            else
            {
                _Writer.WriteLine(" {");
                _Writer.WriteLine('}');
            }
        }
Ejemplo n.º 2
0
 int IClassMemberVisitor <int> .VisitSetAccessor(SetAccessorDeclaration member)
 {
     _Writer.WriteSetAccessor(member, _IsDeclare);
     WriteLineIfNeeded();
     return(0);
 }
Ejemplo n.º 3
0
 int IInterfaceMemberVisitor <int> .VisitSetAccessor(SetAccessorDeclaration member)
 {
     _Writer.WriteSetAccessor(member, !_IsObjectLiteral);
     return(0);
 }