Class RosterDocument
Represents a basic Azure document DB document.
Inheritance
Inherited Members
Namespace: Microsoft.GNS.Roster
Assembly: Microsoft.XboxStudios.SQTech.Roster.Common.dll
Syntax
public class RosterDocument : PropertyObject, IRosterDocument, IRosterIdentity, IPropertyObject, IVerifiable
Constructors
View SourceRosterDocument()
Initializes a new instance of the RosterDocument class.
Declaration
public RosterDocument()
Fields
View SourceEmpty
Represents an empty or unset version of this object.
Declaration
public static readonly RosterDocument Empty
Field Value
Type | Description |
---|---|
RosterDocument |
Properties
View SourceAccessLevel
Gets or sets the access level to the document.
Declaration
[JsonIgnore]
public AccessLevel AccessLevel { get; set; }
Property Value
Type | Description |
---|---|
AccessLevel |
Attachments
Gets or sets references to blobs in Document DB or plain blob storage.
Declaration
[JsonProperty("_attachments")]
public string? Attachments { get; set; }
Property Value
Type | Description |
---|---|
string |
Container
Gets or sets the object container. Container names are case sensitive.
Declaration
[JsonProperty]
public string Container { get; set; }
Property Value
Type | Description |
---|---|
string |
Deleted
Gets a value indicating whether the item is deleted.
Declaration
[JsonIgnore]
public bool Deleted { get; }
Property Value
Type | Description |
---|---|
bool |
Description
Gets or sets the description of this role.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
ETag
Gets an ETag of the resource required for optimistic concurrency control.
Declaration
[JsonProperty("_etag")]
public string? ETag { get; }
Property Value
Type | Description |
---|---|
string |
Id
Gets the object Id.
Declaration
[JsonConverter(typeof(GuidNoneAsEmptyStringConverter))]
[JsonProperty("id")]
public Guid Id { get; }
Property Value
Type | Description |
---|---|
Guid |
Metadata
Gets or sets the user data.
Declaration
[JsonProperty]
public IMetadataItem Metadata { get; set; }
Property Value
Type | Description |
---|---|
IMetadataItem |
Name
Gets or sets the object name. Names are case sensitive.
Declaration
[JsonProperty]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Owner
Gets the object owner.
Declaration
[JsonConverter(typeof(GuidNoneAsEmptyStringConverter))]
[JsonProperty]
public Guid Owner { get; protected set; }
Property Value
Type | Description |
---|---|
Guid |
Rid
Gets a system generated, unique and hierarchical identifier of the resource.
Declaration
[JsonProperty("_rid")]
public string? Rid { get; }
Property Value
Type | Description |
---|---|
string |
Scope
Gets information about the scope of the object.
Declaration
[JsonProperty]
[JsonConverter(typeof(RosterScopeConverter))]
public Scope Scope { get; protected set; }
Property Value
Type | Description |
---|---|
Scope |
Self
Gets a unique addressable URI of the resource.
Declaration
[JsonProperty("_self")]
public string? Self { get; }
Property Value
Type | Description |
---|---|
string |
Timestamp
Gets the last updated time stamp of the resource.
Declaration
[JsonConverter(typeof(UnixDateTimeConverter))]
[JsonProperty("_ts")]
public DateTime Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTime |
Methods
View SourceEquals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
View SourceGetString(string)
Gets a property as a string.
Declaration
public override string GetString(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the property to get. |
Returns
Type | Description |
---|---|
string | The property as a string. |
Overrides
View SourceIsEmpty()
Determines if the object is equal to its 'Empty' value.
Declaration
public virtual bool IsEmpty()
Returns
Type | Description |
---|---|
bool | True if the object is equal to its 'Empty' value. Otherwise, false. |
IsValid()
Determines if an object is in a valid state.
Declaration
public virtual bool IsValid()
Returns
Type | Description |
---|---|
bool | True if the object is valid. Otherwise, false. |