Class GraphContent
Represents and HTTP entity body that carries a serialization of an RDF graph.
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.dll
Syntax
public class GraphContent : HttpContent, IDisposable
  Constructors
| Edit this page View SourceGraphContent(IGraph, string)
Initializes a new instance of GraphContent carrying the specified RDF graph in the specified serialization.
Declaration
public GraphContent(IGraph graph, string contentType)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | graph | The graph to be used for the payload content.  | 
      
| string | contentType | The MIME type of the payload.  | 
      
GraphContent(IGraph, IRdfWriter)
Initializes a new instance of GraphContent.
Declaration
public GraphContent(IGraph graph, IRdfWriter writer)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | graph | The graph to be used for the payload content.  | 
      
| IRdfWriter | writer | The writer to use to serialize the graph.  | 
      
Properties
| Edit this page View SourceContentLengthRequired
Get or set whether the server requires Content-Length to be set.
Declaration
public bool ContentLengthRequired { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
Encoding
Get or set the text encoding to use when writing RDF data.
Declaration
public Encoding Encoding { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Encoding | 
Methods
| Edit this page View SourceDispose(bool)
Declaration
protected override void Dispose(bool disposing)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | disposing | 
Overrides
| Edit this page View SourceSerializeToStreamAsync(Stream, TransportContext)
Declaration
protected override Task SerializeToStreamAsync(Stream stream, TransportContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | |
| TransportContext | context | 
Returns
| Type | Description | 
|---|---|
| Task | 
Overrides
| Edit this page View SourceTryComputeLength(out long)
Declaration
protected override bool TryComputeLength(out long length)
  Parameters
| Type | Name | Description | 
|---|---|---|
| long | length | 
Returns
| Type | Description | 
|---|---|
| bool |