Ejemplo n.º 1
0
 private BlockSyntax InitializeBody(ConstructorDeclarationSyntax ctor, IParameterTransform transform)
 {
     return(Block(ctor.ParameterList.Parameters
                  .Select(p => ExpressionSyntaxFor(p.Identifier.ValueText, transform.ChangeType(p), ArgumentList()))
                  .Concat(new ExpressionStatementSyntax[]
     {
         ExpressionSyntaxFor(ctor.Identifier.VariableName(), ParseTypeName(ctor.Identifier.ValueText), GetMockObjects(ctor.ParameterList))
     })));
 }