Пример #1
0
 /// <summary>Creates a new CSharpDirectiveSyntax instance.</summary>
 public static CSharpDirectiveSyntax CSharpDirective(CSharpTransitionSyntax transition, CSharpSyntaxNode body)
 {
     if (transition == null)
     {
         throw new ArgumentNullException(nameof(transition));
     }
     if (body == null)
     {
         throw new ArgumentNullException(nameof(body));
     }
     return((CSharpDirectiveSyntax)InternalSyntax.SyntaxFactory.CSharpDirective(transition == null ? null : (InternalSyntax.CSharpTransitionSyntax)transition.Green, body == null ? null : (InternalSyntax.CSharpSyntaxNode)body.Green).CreateRed());
 }
Пример #2
0
        public CSharpExpression Update(CSharpTransitionSyntax transition, CSharpSyntaxNode body)
        {
            if (transition != Transition || body != Body)
            {
                var newNode     = SyntaxFactory.CSharpExpression(transition, body);
                var annotations = GetAnnotations();
                if (annotations != null && annotations.Length > 0)
                {
                    return(newNode.WithAnnotations(annotations));
                }
                return(newNode);
            }

            return(this);
        }
Пример #3
0
 /// <summary>Called when the visitor visits a CSharpTransitionSyntax node.</summary>
 public virtual TResult VisitCSharpTransition(CSharpTransitionSyntax node)
 {
     return(DefaultVisit(node));
 }
Пример #4
0
 public new CSharpExpression WithTransition(CSharpTransitionSyntax transition)
 {
     return(Update(transition, _body));
 }
Пример #5
0
 internal override CSharpBlockSyntax WithTransitionCore(CSharpTransitionSyntax transition) => WithTransition(transition);
Пример #6
0
 public new CSharpStatement WithTransition(CSharpTransitionSyntax transition)
 {
     return(Update(transition, _body));
 }
Пример #7
0
 internal abstract CSharpBlockSyntax WithTransitionCore(CSharpTransitionSyntax _transition);
Пример #8
0
 public CSharpBlockSyntax WithTransition(CSharpTransitionSyntax _transition) => WithTransitionCore(_transition);
Пример #9
0
 public new CSharpDirectiveSyntax WithTransition(CSharpTransitionSyntax transition)
 {
     return(Update(transition, _body));
 }