IDataPacker.Raw Property
.NET Standard 2.x
Gets the raw string of text which contains all of the elements in the IDataPacker
object.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Syntax
string Raw { get; }
Property Value
System.String
The raw string of text which contains all of the elements stored in the IDataPacker
object.
It was specified in the constructor of IDataPacker
.
Examples
The following code example gets the original text of the DataPacker
object.
using SnapObjects.Data;
using System;
namespace Appeon.ApiDoc.IDataPackerExamples
{
public class RawExample
{
private readonly SchoolContext _context;
public RawExample(SchoolContext dataContext)
{
// Sets the data context.
_context = dataContext;
}
public void Example()
{
var packer = new DataPacker(DataFormat.Json);
packer.AddValue("name", "Name1");
packer.AddValue("address", "Address1");
Console.WriteLine("Raw Values: {0}", packer.Raw);
/* This code example produces the following output:
Raw Values: {"name":"Name1","address":"Address1"}
*/
}
}
}
Applies to
.NET Standard
2.x