Click or drag to resize

ConventionConfiguration Class

Used to configure the conventions used to e.g. determine index- and attributes names.
Inheritance Hierarchy
SystemObject
  SphinxConnector.FluentApiConventionConfiguration

Namespace:  SphinxConnector.FluentApi
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.3.0
Syntax
public sealed class ConventionConfiguration

The ConventionConfiguration type exposes the following members.

Constructors
  NameDescription
Public methodConventionConfiguration
Initializes a new instance of the ConventionConfiguration class.
Top
Properties
  NameDescription
Public propertyDocumentIdGenerator
Gets or sets a method that generates a document id for the given document. There is no default method. An exception will be thrown if no id generator has been configured and a document without a valid id (as determined by DocumentNeedsIdAssigned is about to be stored in an index.
Public propertyDocumentNeedsIdAssigned
Gets or sets a method that determines whether the given document needs to have an id assigned before saving. If not, DocumentIdGenerator will be called to generate an id which will then be assigned to the document. The default method will return false, if the id member (determined by IsIdMember) has a value greater 0, otherwise true.
Public propertyCode exampleGetAttributeName
Gets or sets a method that returns the attribute name for the given property or field. The default uses the member name and converts it to all lower case letters.
Public propertyCode exampleGetIndexName
Gets or sets the method that returns the index names(s) for the given type. The default converts the type name to lower case and pluralizes it (by appending an 's').
Public propertyGetJsonFieldName
Gets or sets a method that returns the field name for the given property or field of a JSON object. The default uses the member name as is, without any modifications.
Public propertyIsFulltextFieldOnly
Gets or sets a method that determines if the given property or field of type string is a full-text field only, i.e. it is not available as a string attribute in the index. The default always returns false.
Public propertyCode exampleIsIdMember
Gets or sets a method that determines if the given property or field of a type represents the document id. The default looks for a member named Id.
Public propertySaveEnumsAsIntegers
Gets or sets a value that indicates whether enums should be persisted as integers. Default is true.
Public propertySerializeTypeAsJson
Gets or sets a method that determines if the given type should be serialized to JSON. The default is to serialize types to JSON if they can't be stored in any other Sphinx attribute type.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also