Beamable SDK
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Events | List of all members
DisruptorBeam.Content.ContentObject Class Reference
Inheritance diagram for DisruptorBeam.Content.ContentObject:
Inheritance graph
[legend]
Collaboration diagram for DisruptorBeam.Content.ContentObject:
Collaboration graph
[legend]

Public Member Functions

ContentObject SetContentName (string name)
 
ContentObject SetContentMetadata (string name, string version)
 
void BroadcastUpdate ()
 
void Serialize (JsonSerializable.IStreamSerializer s)
 Serialize this content into a json block, containing ONLY the properties object. Ex: { "sample": { "data": 4 }, "sample2": { "data": { "nested": 5 } } } More...
 
void ApplyProperties (ArrayDict dict)
 Set all the values of this content object from the given ArrayDict. This is a modifying action. More...
 
virtual void Validate ()
 Validate this ContentObject. More...
 
bool HasValidationErrors (out List< string > errors)
 
List< ContentValidationExceptionGetMemberValidationErrors ()
 

Static Public Member Functions

static TContent FromDictionary< TContent > (string name, ArrayDict dict)
 Create a new piece of content More...
 
static string GetContentType (Type contentType)
 
static string GetContentType< TContent > ()
 
static TContent Make< TContent > (string name)
 

Public Attributes

string ContentType => GetContentType(GetType())
 
string Id => $"{ContentType}.{ContentName}"
 

Properties

string ContentVersion [get]
 
string ContentName [get]
 

Events

ContentDelegate OnChanged
 

Member Function Documentation

◆ ApplyProperties()

void DisruptorBeam.Content.ContentObject.ApplyProperties ( ArrayDict  dict)
inline

Set all the values of this content object from the given ArrayDict. This is a modifying action.

Parameters
dictAn array dict that should only contain the properties json object

◆ FromDictionary< TContent >()

static TContent DisruptorBeam.Content.ContentObject.FromDictionary< TContent > ( string  name,
ArrayDict  dict 
)
inlinestatic

Create a new piece of content

Parameters
nameThe name of the content, should be unique
dictThe property object to set the content values
Template Parameters
TContentSome type of content
Returns
Type Constraints
TContent :ContentObject 
TContent :new() 

◆ Serialize()

void DisruptorBeam.Content.ContentObject.Serialize ( JsonSerializable.IStreamSerializer  s)
inline

Serialize this content into a json block, containing ONLY the properties object. Ex: { "sample": { "data": 4 }, "sample2": { "data": { "nested": 5 } } }

Parameters
s

Implements Core.Serialization.JsonSerializable.ISerializable.

◆ Validate()

virtual void DisruptorBeam.Content.ContentObject.Validate ( )
inlinevirtual

Validate this ContentObject.

Exceptions
AggregateContentValidationExceptionShould throw if the content is semantically invalid.

The documentation for this class was generated from the following file: