Beamable SDK
Static Public Member Functions | Static Public Attributes | List of all members
Beamable.Common.Assistant.BeamHintDomains Class Reference

BeamHint domains are a large-scale contextual grouping for hints. We use these to organize and display them in a logical and easy to navigate way. Domains cannot have SUB_DOMAIN_SEPARATOR, BeamHintHeader.AS_KEY_SEPARATOR or BeamHintSharedConstants.BEAM_HINT_PREFERENCES_SEPARATOR as they are reserved characters More...

Inheritance diagram for Beamable.Common.Assistant.BeamHintDomains:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Common.Assistant.BeamHintDomains:
Collaboration graph
[legend]

Static Public Member Functions

static string GenerateUserDomain (string userDomainName)
 Call this method to generate user domain names. We use these so we can make optimizations when querying hints and storages that are created by users versus create by Beamable. More...
 
static bool IsUserDomain (string domain)
 Checks if a domain is a User-created domain.
 
static bool IsBeamableDomain (string domain)
 Checks if a domain is a Beamable-created domain.
 
static string GenerateSubDomain (string ownerDomain, string subDomainName)
 Generate a sub-domain. These are used by the UI to group BeamHints hierarchically and display them in a more organized way. Sub-domains are simply domain strings separated by SUB_DOMAIN_SEPARATOR. More...
 
static bool IsInitializationDomain (string domain)
 
static bool IsReflectionCacheDomain (string domain)
 
static bool IsCSharpMSDomain (string domain)
 
static bool IsContentDomain (string domain)
 
static bool IsAssistantDomain (string domain)
 
static bool TryGetDomainAtDepth (string domain, int currDepth, out string subDomain)
 Attempts to get a sub-domain at depth currDepth from the given domain string. More...
 
static int GetDomainDepth (string domain)
 Gets how many sub-domains are baked into the given domain string. More...
 

Static Public Attributes

const string USER_DOMAIN_PREFIX = "USER"
 Domains generated by GenerateUserDomain start with this prefix.
 
const string BEAM_DOMAIN_PREFIX = "BEAM"
 Domains generated by GenerateBeamableDomain start with this prefix.
 
const string SUB_DOMAIN_SEPARATOR = "¬"
 Character used to textually split domains.
 
static readonly string BEAM_INIT = GenerateBeamableDomain("INITIALIZATION")
 
static readonly string BEAM_REFLECTION_CACHE = GenerateBeamableDomain("REFLECTION_CACHE")
 
static readonly string BEAM_CSHARP_MICROSERVICES = GenerateBeamableDomain("C#MS")
 
static readonly string BEAM_CSHARP_MICROSERVICES_CODE_MISUSE = GenerateSubDomain(BEAM_CSHARP_MICROSERVICES, "CODE_MISUSE")
 
static readonly string BEAM_CSHARP_MICROSERVICES_DOCKER = GenerateSubDomain(BEAM_CSHARP_MICROSERVICES, "DOCKER")
 
static readonly string BEAM_CONTENT = GenerateBeamableDomain("CONTENT")
 
static readonly string BEAM_CONTENT_CODE_MISUSE = GenerateSubDomain(BEAM_CONTENT, "CODE_MISUSE")
 
static readonly string BEAM_ASSISTANT = GenerateBeamableDomain("BEAMABLE_ASSISTANT")
 
static readonly string BEAM_ASSISTANT_CODE_MISUSE = GenerateSubDomain(BEAM_ASSISTANT, "CODE_MISUSE")
 

Detailed Description

BeamHint domains are a large-scale contextual grouping for hints. We use these to organize and display them in a logical and easy to navigate way.

Domains cannot have SUB_DOMAIN_SEPARATOR, BeamHintHeader.AS_KEY_SEPARATOR or BeamHintSharedConstants.BEAM_HINT_PREFERENCES_SEPARATOR as they are reserved characters

Member Function Documentation

◆ GenerateSubDomain()

static string Beamable.Common.Assistant.BeamHintDomains.GenerateSubDomain ( string  ownerDomain,
string  subDomainName 
)
static

Generate a sub-domain. These are used by the UI to group BeamHints hierarchically and display them in a more organized way. Sub-domains are simply domain strings separated by SUB_DOMAIN_SEPARATOR.

Parameters
ownerDomainA string generated via one of these GenerateBeamableDomain, GenerateUserDomain or GenerateSubDomain.
subDomainNameThe name of the sub-domain to append.
Returns
A string defining the path to the sub-domain.

◆ GenerateUserDomain()

static string Beamable.Common.Assistant.BeamHintDomains.GenerateUserDomain ( string  userDomainName)
static

Call this method to generate user domain names. We use these so we can make optimizations when querying hints and storages that are created by users versus create by Beamable.

Parameters
userDomainNameThe "_"-separated all-caps name of your BeamHint domain.
Returns
A prefixed userDomainName that you can use to generate your own BeamHints with.

◆ GetDomainDepth()

static int Beamable.Common.Assistant.BeamHintDomains.GetDomainDepth ( string  domain)
static

Gets how many sub-domains are baked into the given domain string.

Parameters
domainA string generated by GenerateUserDomain, GenerateUserDomain and/or GenerateSubDomain.

◆ TryGetDomainAtDepth()

static bool Beamable.Common.Assistant.BeamHintDomains.TryGetDomainAtDepth ( string  domain,
int  currDepth,
out string  subDomain 
)
inlinestatic

Attempts to get a sub-domain at depth currDepth from the given domain string.

At 0, returns the higher-level domain. At 1, the first sub-domain. Etc...


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