public SerializationMetadata AcquirePropertyMetadata(Type type, PropertyInfo property, ref uint nextIndex)
        {
            var args = new AcquirePropertyMetadataArgs(type, property);
            OnAcquirePropertyMetadata(args);

            var index = args.Index.HasValue ? args.Index.Value : nextIndex++;
            var metadata = new SerializationMetadata(index, args.Args);
            return metadata;
        }
Esempio n. 2
0
        public SerializationMetadata AcquirePropertyMetadata(Type type, PropertyInfo property, ref uint nextIndex)
        {
            var args = new AcquirePropertyMetadataArgs(type, property);

            OnAcquirePropertyMetadata(args);

            var index = args.Index ?? nextIndex;

            nextIndex = index + 1;
            var metadata = new SerializationMetadata(index);

            return(metadata);
        }
Esempio n. 3
0
 public static VisitArgs Value(string name, SerializationMetadata metadata)
 {
     return new VisitArgs(name, metadata, LevelType.Value);
 }
Esempio n. 4
0
 public static VisitArgs Dictionary(string name, SerializationMetadata metadata)
 {
     return new VisitArgs(name, metadata, LevelType.Dictionary);
 }
Esempio n. 5
0
 public static VisitArgs Collection(string name, SerializationMetadata metadata)
 {
     return new VisitArgs(name, metadata, LevelType.Collection);
 }
Esempio n. 6
0
 public VisitArgs(string name, SerializationMetadata metadata, LevelType type)
 {
     _name = name;
     _metadata = metadata;
     _type = type;
 }
Esempio n. 7
0
 public SerializableProperty(PropertyInfo @ref, SerializationMetadata metadata, ITypeProvider provider)
 {
     Ref      = @ref;
     Metadata = metadata;
     Ext      = provider.Extend(Ref.PropertyType);
 }
Esempio n. 8
0
 public SerializableProperty(PropertyInfo @ref, SerializationMetadata metadata)
 {
     _ref = @ref;
     _metadata = metadata;
     _ext = _ref.PropertyType.Extend();
 }