Fauna v10 .NET/C# Driver
1.0.0
Loading...
Searching...
No Matches
repo.git
Fauna
Query
IQueryFragment.cs
Go to the documentation of this file.
1
using
System.Text;
2
using
Fauna.Mapping
;
3
using
Fauna.Serialization
;
4
5
namespace
Fauna
;
6
10
public
interface
IQueryFragment
11
{
17
void
Serialize
(
MappingContext
ctx,
Utf8FaunaWriter
writer);
18
}
19
24
public
static
class
QueryFragmentExtensions
25
{
32
public
static
string
Serialize
(
this
IQueryFragment
fragment,
MappingContext
ctx)
33
{
34
using
var ms =
new
MemoryStream();
35
using
var fw =
new
Utf8FaunaWriter
(ms);
36
fragment.
Serialize
(ctx, fw);
37
fw.Flush();
38
return
Encoding.UTF8.GetString(ms.ToArray());
39
}
40
}
Fauna.Mapping.MappingContext
A class representing the mapping context to be used during serialization and deserialization.
Definition
MappingContext.cs:10
Fauna.Serialization.Utf8FaunaWriter
Provides functionality for writing data in a streaming manner to a buffer or a stream.
Definition
Utf8FaunaWriter.cs:13
Fauna.IQueryFragment
Represents the base interface for a query fragment used for FQL query construction.
Definition
IQueryFragment.cs:11
Fauna.IQueryFragment.Serialize
void Serialize(MappingContext ctx, Utf8FaunaWriter writer)
Serializes the query fragment into the provided stream.
Fauna.Mapping
Definition
Attributes.cs:1
Fauna.Serialization
Definition
BaseRefSerializer.cs:5
Fauna.Serialization.Serialize
void ISerializer. Serialize(MappingContext context, Utf8FaunaWriter writer, object? o)
Serializes the provided object onto the Utf8FaunaWriter
Fauna
Definition
Client.cs:10
Generated by
1.9.8