/// <summary> /// Clone the aggregate serializer and leave out the requesting (to avoid infinite loops) /// </summary> /// <param name="serializer">The serializer requesting the aggregate clone</param> /// <returns>An aggregate serializer that omits the requesting serializer</returns> public ISterlingSerializer CloneFor(ISterlingSerializer serializer) { var aggregateSerializer = new AggregateSerializer( _platformAdapter ); var query = from s in _serializers where !s.GetType().Equals(serializer.GetType()) select s; foreach(var s in query) { aggregateSerializer.AddSerializer(s); } return aggregateSerializer; }
/// <summary> /// Clone the aggregate serializer and leave out the requesting (to avoid infinite loops) /// </summary> /// <param name="serializer">The serializer requesting the aggregate clone</param> /// <returns>An aggregate serializer that omits the requesting serializer</returns> public ISterlingSerializer CloneFor(ISterlingSerializer serializer) { var aggregateSerializer = new AggregateSerializer(); var query = from s in _serializers where !s.GetType().Equals(serializer.GetType()) select s; foreach (var s in query) { aggregateSerializer.AddSerializer(s); } return(aggregateSerializer); }
public SterlingSerializerException(ISterlingSerializer serializer, Type targetType) : base(string.Format(Exceptions.SterlingSerializerException, serializer.GetType().FullName, targetType.FullName)) { }
public SterlingSerializerException(ISterlingSerializer serializer, Type targetType) : base($"{serializer.GetType().FullName} {targetType.FullName}") { }