Ejemplo n.º 1
0
        protected override InvocationExpressionSyntax GetManagedValuesSource(TypePositionInfo info, StubCodeContext context)
        {
            string marshaller = StatefulValueMarshalling.GetMarshallerIdentifier(info, context);

            // <marshaller>.GetManagedValuesSource()
            return(InvocationExpression(
                       MemberAccessExpression(
                           SyntaxKind.SimpleMemberAccessExpression,
                           IdentifierName(marshaller),
                           IdentifierName(ShapeMemberNames.LinearCollection.Stateful.GetManagedValuesSource)),
                       ArgumentList()));
        }
Ejemplo n.º 2
0
        protected override InvocationExpressionSyntax GetManagedValuesDestination(TypePositionInfo info, StubCodeContext context)
        {
            string marshaller            = StatefulValueMarshalling.GetMarshallerIdentifier(info, context);
            string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);

            // <marshaller>.GetManagedValuesDestination(<numElements>)
            return(InvocationExpression(
                       MemberAccessExpression(
                           SyntaxKind.SimpleMemberAccessExpression,
                           IdentifierName(marshaller),
                           IdentifierName(ShapeMemberNames.LinearCollection.Stateless.GetManagedValuesDestination)),
                       ArgumentList(SingletonSeparatedList(
                                        Argument(IdentifierName(numElementsIdentifier))))));
        }