//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override @Requires({"encodingType != null", "nValuesPerGenotype >= 0 || ! getFieldEncoder().hasConstantNumElements()"}) @Ensures("nValuesPerGenotype >= 0") public void start(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc) throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: public override void start(BCF2Encoder encoder, VariantContext vc) { // writes the key information base.start(encoder, vc); // only update if we need to if (!FieldEncoder.hasConstantNumElements()) { if (FieldEncoder.hasContextDeterminedNumElements()) // we are cheap -- just depends on genotype of allele counts { nValuesPerGenotype = FieldEncoder.numElements(vc); } else // we have to go fishing through the values themselves (expensive) { nValuesPerGenotype = computeMaxSizeOfGenotypeFieldFromValues(vc); } } encoder.encodeType(nValuesPerGenotype, encodingType); }