Ejemplo n.º 1
0
 internal Hasher(IIonHasherProvider hasherProvider)
 {
     this.hasherProvider = hasherProvider;
     this.currentHasher  = new Serializer(hasherProvider.NewHasher(), 0);
     this.hasherStack    = new Stack <Serializer>();
     this.hasherStack.Push(this.currentHasher);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Specifies the hasher provider to use.
 /// </summary>
 /// <param name="hasherProvider">The IIonHasherProvider instance to use.</param>
 /// <returns>This builder.</returns>
 public IonHashReaderBuilder WithHasherProvider(IIonHasherProvider hasherProvider)
 {
     this.hasherProvider = hasherProvider;
     return(this);
 }
 public IonHashWriterBuilder WithHasherProvider(IIonHasherProvider hasherProvider)
 {
     this.hasherProvider = hasherProvider;
     return this;
 }
Ejemplo n.º 4
0
 internal IonHashReader(IIonReader reader, IIonHasherProvider hasherProvider)
 {
     this.hasher = new Hasher(hasherProvider);
     this.reader = reader;
 }
Ejemplo n.º 5
0
 internal IonHashWriter(IIonWriter writer, IIonHasherProvider hasherProvider)
 {
     this.writer      = writer;
     this.hasher      = new Hasher(hasherProvider);
     this.Annotations = new List <SymbolToken>();
 }
Ejemplo n.º 6
0
 internal StructSerializer(IIonHasher hashFunction, int depth, IIonHasherProvider hashFunctionProvider)
     : base(hashFunction, depth)
 {
     this.scalarSerializer = new Serializer(hashFunctionProvider.NewHasher(), depth + 1);
     this.fieldHashes      = new List <byte[]>();
 }