Example #1
0
        public void Dispose()
        {
            if (this.sharedSerializer != null)
            {
                this.sharedSerializer.Dispose();
                this.sharedSerializer = null;
            }

            if (this.adfSerializer != null)
            {
                this.adfSerializer.Dispose();
                this.adfSerializer = null;
            }
        }
Example #2
0
        internal VowpalWabbitMultiExampleSerializer(VowpalWabbit vw,
                                                    VowpalWabbitSingleExampleSerializer <TExample> sharedSerializer,
                                                    VowpalWabbitSingleExampleSerializer <TActionDependentFeature> adfSerializer,
                                                    Func <TExample, IEnumerable <TActionDependentFeature> > adfAccessor)
        {
            // sharedSerializer can be null
            Contract.Requires(vw != null);
            Contract.Requires(adfSerializer != null);
            Contract.Requires(adfAccessor != null);

            this.vw = vw;
            this.sharedSerializer = sharedSerializer;
            this.adfSerializer    = adfSerializer;
            this.adfAccessor      = adfAccessor;
        }