コード例 #1
0
 /// <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;
 }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
 public SterlingSerializerException(ISterlingSerializer serializer, Type targetType) :
     base(string.Format(Exceptions.SterlingSerializerException, serializer.GetType().FullName, targetType.FullName))
 {
 }
コード例 #4
0
 public SterlingSerializerException(ISterlingSerializer serializer, Type targetType) : 
     base(string.Format(Exceptions.SterlingSerializerException, serializer.GetType().FullName, targetType.FullName))
 {
     
 }
コード例 #5
0
 public SterlingSerializerException(ISterlingSerializer serializer, Type targetType) :
     base($"{serializer.GetType().FullName} {targetType.FullName}")
 {
 }