Tech Off Thread

2 posts

System.AddIn - Designing Contract

Back to Forum: Tech Off
  • Oggelito

    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


  • Oggelito

    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.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.