About 159,087 results: "List<Object>"
Page 4 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On











  1.       throw JsonSerializationException.Create(reader, @"Cannot deserialize the current JSON object (e.g. {{""name"":""value""}}) into type '{0}' because the type requires a {1} to deserialize correctly.
  2. To fix this error either change the JSON to a {1} or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
  3.         throw JsonSerializationException.Create(reader, @"Cannot deserialize the current JSON array (e.g. [1,2,3]) into type '{0}' because the type requires a {1} to deserialize correctly.
  4. To fix this error either change the JSON to a {1} or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
  5. 
                        
  6.     private object CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
  7.         {
  8.           bool isTemporaryListReference;
  9.           IList list = CollectionUtils.CreateList(contract.CreatedType, out isTemporaryListReference);
  10. 
                        
  11.           if (id != null && isTemporaryListReference)
  12.             throw JsonSerializationException.Create(reader, "Cannot preserve reference to array or readonly list: {0}.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType));
  13. 
                        
  14. #if !PocketPC
  15.           if (contract.OnSerializing != null && isTemporaryListReference)
  16.             throw JsonSerializationException.Create(reader, "Cannot call OnSerializing on an array or readonly list: {0}.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType));




  1.             string ignored;
  2.             Assert.IsFalse(r.IsValidChangeSet(new Dictionary<object, Restrictions.ShadowModifiedMember[]>(), new List<object>() { new User() }, new List<object>(), new List<object>(), new List<int>(), out ignored));
  3.             string ignored;
  4.             Assert.IsFalse(r.IsValidChangeSet(updates, new List<object>(), new List<object>(), new List<object>() { user }, new List<int>(), out ignored), ignored);
  5.             string ignored;
  6.             Assert.IsTrue(r.IsValidChangeSet(updates, new List<object>(), new List<object>(), new List<object>() { user }, new List<int>() { 1 }, out ignored), ignored);
  7.             string ignored;
  8.             Assert.IsFalse(r.IsValidChangeSet(updates, new List<object>(), new List<object>() { history }, new List<object>(), new List<int>(), out ignored));
  9.             string ignored;
  10.             Assert.IsTrue(r.IsValidChangeSet(updates, new List<object>(), new List<object>() { history }, new List<object>(), new List<int>() { 1 }, out ignored));
  11.             string ignored;
  12.             Assert.IsFalse(r.IsValidChangeSet(updates, new List<object>(), new List<object>(), new List<object>() { attr }, new List<int>(), out ignored));
  13.             string ignored;
  14.             Assert.IsTrue(r.IsValidChangeSet(updates, new List<object>(), new List<object>(), new List<object>() { attr }, new List<int>() { 1 }, out ignored));
  15.             string ignored;
  16.             Assert.IsFalse(r.IsValidChangeSet(updates, new List<object>(), new List<object>() { attr }, new List<object>(), new List<int>(), out ignored));





Back to Top