Class OpenSearchTypeAttribute
Applied to a CLR type to override the name of a CLR type and the property from which an _id is inferred when serializing an instance of the type.
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class OpenSearchTypeAttribute : Attribute
Properties
| Edit this page View SourceIdProperty
The property on CLR type to use as the _id of the document
Declaration
public string IdProperty { get; set; }
Property Value
Type | Description |
---|---|
string |
RelationName
The name of the CLR type for serialization
Declaration
public string RelationName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceFrom(Type)
Gets the first OpenSearchTypeAttribute from a given CLR type
Declaration
public static OpenSearchTypeAttribute From(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
OpenSearchTypeAttribute |