/// <exception cref="VPackException"/> public override BigInteger Deserialize( VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsBigInteger); }
/// <exception cref="VPackException"/> public override VPackSlice Deserialize( VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack); }
private VPack( IDictionary <Type, IVPackSerializer> serializers, IDictionary <Type, IVPackDeserializer> deserializers, IDictionary <Type, IVPackInstanceCreator> instanceCreators, VPackBuilder.IBuilderOptions builderOptions, bool serializeNullValues, IVPackFieldNamingStrategy fieldNamingStrategy, IDictionary <string, IDictionary <Type, IVPackDeserializer> > deserializersByName) { this.serializers = serializers; this.deserializers = deserializers; this.instanceCreators = instanceCreators; this.builderOptions = builderOptions; this.serializeNullValues = serializeNullValues; this.deserializersByName = deserializersByName; this.keyMapAdapters = new Dictionary <Type, IVPackKeyMapAdapter>(); this.cache = new VPackCache(fieldNamingStrategy); this.serializationContext = new _VPackSerializationContext_209(this); this.deserializationContext = new _VPackDeserializationContext_216(this); this.keyMapAdapters[typeof(string)] = VPackKeyMapAdapters.STRING; this.keyMapAdapters[typeof(bool)] = VPackKeyMapAdapters.BOOLEAN; this.keyMapAdapters[typeof(int)] = VPackKeyMapAdapters.INTEGER; this.keyMapAdapters[typeof(long)] = VPackKeyMapAdapters.LONG; this.keyMapAdapters[typeof(short)] = VPackKeyMapAdapters.SHORT; this.keyMapAdapters[typeof(double)] = VPackKeyMapAdapters.DOUBLE; this.keyMapAdapters[typeof(float)] = VPackKeyMapAdapters.FLOAT; this.keyMapAdapters[typeof(BigInteger)] = VPackKeyMapAdapters.BIG_INTEGER; this.keyMapAdapters[typeof(decimal)] = VPackKeyMapAdapters.NUMBER; this.keyMapAdapters[typeof(char)] = VPackKeyMapAdapters.CHARACTER; }
/// <exception cref="VPackException"/> public BaseEdgeDocument deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(new BaseEdgeDocument(context.deserialize <System.Collections.IDictionary >(vpack))); }
/// <exception cref="VPackException"/> public override decimal Deserialize( VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsNumber); }
/// <exception cref="VPackException"/> public string deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { string id; if (vpack.isCustom()) { long idLong = NumberUtil.toLong(vpack.getBuffer (), vpack.getStart() + 1, vpack.getByteSize() - 1); string collectionName = this.cache.getCollectionName(idLong); if (collectionName != null) { VPackSlice key = parent.get("_key"); id = string.format("%s/%s", collectionName, key.getAsString()); } else { id = null; } } else { id = vpack.getAsString(); } return(id); }
/// <exception cref="VPackException"/> public Response deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { Response response = new Response (); response.setVersion(vpack.get(0).getAsInt()); response.setType(vpack.get(1).getAsInt()); response.setResponseCode(vpack.get(2).getAsInt()); return(response); }
/// <exception cref="VPackException"/> public System.DateTime deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { try { return(new java.text.SimpleDateFormat(VPackDeserializers .DATE_TIME_FORMAT).parse(vpack.getAsString())); } catch (java.text.ParseException) { if (VPackDeserializers.LOGGER.isDebugEnabled()) { VPackDeserializers.LOGGER.debug("got ParseException for date string: " + vpack.getAsString()); } } return(null); }
/// <exception cref="VPackException"/> public System.DateTime deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsDate()); }
/// <exception cref="VPackException"/> public char deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsChar()); }
/// <exception cref="VPackException"/> public java.lang.Number deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsNumber()); }
/// <exception cref="VPackException"/> public java.math.BigDecimal deserialize(VPackSlice parent , VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsBigDecimal()); }
/// <exception cref="VPackException"/> public override DateTime Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsDate); }
/// <exception cref="VPackException"/> public long deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsLong()); }
/// <exception cref="VPackException"/> public bool deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsBoolean()); }
object IVPackDeserializer.Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(Deserialize(parent, vpack, context)); }
/// <exception cref="VPackException"/> public LogLevel deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(LogLevel.fromLevel(vpack.getAsInt())); }
/// <exception cref="VPackException"/> public override bool Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsBoolean); }
/// <exception cref="VPackException"/> public override long Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsLong); }
/// <exception cref="VPackException"/> public override float Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsFloat); }
/// <exception cref="VPackException"/> public java.sql.Date deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsSQLDate()); }
/// <exception cref="VPackException"/> public CollectionType deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(CollectionType.fromType(vpack.getAsInt())); }
/// <exception cref="VPackException"/> public java.sql.Timestamp deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsSQLTimestamp()); }
/// <exception cref="VPackException"/> public CollectionStatus deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(CollectionStatus.fromStatus(vpack.getAsInt())); }
/// <exception cref="VPackException"/> public int deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsInt()); }
/// <exception cref="VPackException"/> public double deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.getAsDouble()); }
/// <exception cref="VPackException"/> public abstract T Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context);
/// <exception cref="VPackException"/> public override char Deserialize(VPackSlice parent, VPackSlice vpack, VPackDeserializationContext context) { return(vpack.AsChar); }