Lucene.Net.Codecs.Memory.MemoryPostingsFormat.fieldsConsumer C# (CSharp) Method

fieldsConsumer() public method

public fieldsConsumer ( SegmentWriteState state ) : FieldsConsumer
state SegmentWriteState
return FieldsConsumer
	  public override FieldsConsumer fieldsConsumer(SegmentWriteState state)
	  {

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String fileName = index.IndexFileNames.SegmentFileName(state.segmentInfo.name, state.segmentSuffix, EXTENSION);
		string fileName = IndexFileNames.SegmentFileName(state.segmentInfo.name, state.segmentSuffix, EXTENSION);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final store.IndexOutput out = state.directory.createOutput(fileName, state.context);
		IndexOutput @out = state.directory.createOutput(fileName, state.context);
		bool success = false;
		try
		{
		  CodecUtil.WriteHeader(@out, CODEC_NAME, VERSION_CURRENT);
		  success = true;
		}
		finally
		{
		  if (!success)
		  {
			IOUtils.CloseWhileHandlingException(@out);
		  }
		}

		return new FieldsConsumerAnonymousInnerClassHelper(this, @out);
	  }