I found magic attribute called CollectionDataContract what makes a trick.
Adding new collection class:
[CollectionDataContract(Namespace = "")]
public class MyFooCollection : List<MyFoo>
{
}
Changed Query class
[DataContract(Namespace="")]
public class FooQuery
{
[DataMember]
public /*MyFoo[]*/MyFooCollection FooArray;
}
client code change:
MyFooCollection _collection = new MyFooCollection();
_collection.Add(_myFoo);
myOriginalFoo.FooArray = _collection; //new MyFoo[] { _myFoo };
All variables serialized now right :) yeah..takes many hours to figure out.