Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

System.AddIn - Designing Contract

Back to Forum: Tech Off
  • User profile image

    Passing complex object arrays isn't the most trivial thing.

    My proof of concept contract:

        public interface IDataResult : IContract


            string Name { get; set; }

            int? Age { get; set; }

            IArrayContract<IDataResult> Children { get; }

    How am I supposed do implement the IArrayContract, since a simple array didnt seem to work. And the documentation is not very clear.

    IDataResult[] Children { get; } resulted in a SerializationException.

    Any help would be appreciated

  • User profile image

    I implemented both IArrayContract and then IEnumeratorContract as two "ViewToContractAdapters" deriving from ContractBase.

    And it worked, too my surprise..

    But, I have to add, the documentation of this could be much better. I am sure this won't be my last problem. But to consort with the forum is really my last resort.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.