Ejemplo n.º 1
0
        Store.Builder _Store(IEntity e)
        {
            var t = _tables[e];
            var s = _serializers.Get(e);

            return(new Store.Builder().WithTable(t.Name).WithColumns(s.Columns));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public ISerializer Get(TypeInfo parameter)
        {
            var serializer = _serializers.Get(parameter);
            var result     = _specification.IsSatisfiedBy(parameter)
                                             ? new Serializer(serializer, new Writer(_serializers))
                                             : serializer;

            return(result);
        }
Ejemplo n.º 3
0
            public ISerializer Get(TypeInfo parameter)
            {
                var write  = _writers.Get(parameter);
                var result = _specification.IsSatisfiedBy(parameter) ? new Serializer(_conditions, _instances, write) : write;

                return(result);
            }
            public ISerializer Get(TypeInfo parameter)
            {
                var specification = _specifications.Get(parameter);
                var serializer    = _serializers.Get(parameter);
                var result        = specification != null ? new Serializer(specification, serializer) : serializer;

                return(result);
            }
Ejemplo n.º 5
0
        public ISerializer Get(TypeInfo parameter)
        {
            var itemType   = _locator.Get(parameter);
            var serializer = _serializers.Get(itemType);
            var item       = new Serializer(serializer, new CollectionItemAwareWriter(serializer));
            var result     = _contents.Get(new CollectionContentInput(item, parameter, itemType));

            return(result);
        }
Ejemplo n.º 6
0
 public object Get(T parameter)
 {
     using (var content = _readers.Get(parameter))
     {
         var classification = _classification.GetClassification(content);
         var result         = _serializers.Get(classification)
                              .Get(content);
         return(result);
     }
 }
Ejemplo n.º 7
0
 public ISerializer Get(TypeInfo parameter)
 => _specification.IsSatisfiedBy(parameter)
                            ? throw new InvalidOperationException("Dynamic/anonymous types are not supported.")
                            : _previous.Get(parameter);
Ejemplo n.º 8
0
 public void Execute(Writing <T> parameter)
 {
     _serializers.Get(parameter.Instance.GetType()
                      .GetTypeInfo())
     .Write(_writers.Get(parameter.Writer), parameter.Instance);
 }
 protected override ISerializer Create(TypeInfo parameter)
 => new DeferredReferenceSerializer(_serializers.Get(parameter));
            public void Write(IFormatWriter writer, object instance)
            {
                var type     = instance?.GetType();
                var selected = type != null && _type.IsSatisfiedBy(type) ? _serializer : _serializers.Get(type);

                selected.Write(writer, instance);
            }
Ejemplo n.º 11
0
 public ISerializer Get(TypeInfo parameter)
 => _policy.IsSatisfiedBy(parameter) ? _previous.Get(parameter) : EmptySerializer.Instance;