Exemple #1
0
 public static MemberAssignment Serialize(E.MemberAssignment binding)
 {
     return(new MemberAssignment()
     {
         Member = MemberRef.Serialize(binding.Member),
         Expression = Node.Serialize(binding.Expression),
     });
 }
Exemple #2
0
 internal static SwitchCase Serialize(E.SwitchCase @case)
 {
     return(new SwitchCase()
     {
         TestValues = @case.TestValues.Select(Node.Serialize).ToArray(),
         Body = Node.Serialize(@case.Body),
     });
 }
Exemple #3
0
 internal static CatchBlock Serialize(E.CatchBlock handler)
 {
     return(new CatchBlock()
     {
         Test = handler.Variable == null
             ? TypeRef.Serialize(handler.Test)
             : null,
         Variable = handler.Variable.Null(v => Node.Parameter(v)),
         Filter = handler.Filter.Null(e => Node.Serialize(e)),
         Body = Node.Serialize(handler.Body),
     });
 }