StringOutputAdapter Class
Represents an output adapter that collects output as a String.
Inheritance Hierarchy

Namespace: GroupDocs.Search.Common
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.8
Syntax
public class StringOutputAdapter : OutputAdapter

The StringOutputAdapter type exposes the following members.

Constructors
  NameDescription
Public methodStringOutputAdapter
Initializes a new instance of the StringOutputAdapter class.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetResult
Gets the resulting string.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
Examples
The example demonstrates a typical usage of the class.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";

Index index = new Index(indexFolder); // Creating an index in the specified folder

index.Add(documentsFolder); // Indexing documents from the specified folder

DocumentInfo[] documents = index.GetIndexedDocuments(); // Getting information on indexed documents

StringOutputAdapter adapter = new StringOutputAdapter(); // Creating a string output adapter
index.GetDocumentText(documents[0], adapter); // Generating a document text into the adapter
String result = adapter.GetResult(); // Getting a result
See Also