DaisiStaticSettings

Namespace: Daisi.SDK.Models

This is a static helper class for configuring various SDK defaults.

Static Properties

  • string? ClientKey get and set
    The client key that will be passed to the Orc and Hosts if using static client keys for your app. Your app's client key should not be the same as your Users'' client keys if you are using Daisi Authentication.
  • string ClientKeyHeader get
    This is the header that the Orcs and Hosts will be looking for during authentication and authorization.
  • IClientKeyProvider DefaultClientKeyProvider get
    Setting this value will allow you to create any of the client factory classes without having an instance of a IClientKeyProvider.
  • string NetworkName get and set
    Allows consumers to set the network that they want to use by name. Default is "devnet".
  • string OrcIpAddressOrDomain get and set
    This is the IpAddress ("192.168.1.100") or domain ("orc-dev.daisinet.com") for the Orc that you intend to connect to. Your app will be assigned an orc automatically or you can assign it manually in the app startup by setting this value.
  • int OrcPort get and set
    This is the publicly exposed port number that your Orc uses for incoming connections. Default is 443, for SSL.
  • string OrcUrl get
    Gets the full Url for the Orc that is currently setup by combining the domain, ssl settings, and port.
  • bool OrcUseSSL get and set
    Determines whether your Orc uses SSL or not. Highly recommended that you leave this as the default value of True. If you have a situation where you need to connect to an Orc without SSL in a production environment, please understand that these connections will not be secure and you will potentially expose important information.
  • string Protocol get
    Helper function. Returns "https" is OrcUseSSL is true or "http" if OrcUseSSL is false.
  • string? SecretKey get and set
    This is your app's secret key. This is only sent to the Orcs and never exposed to Hosts. You should keep it a secret as well, hence the name.

Static Methods

  • void AutoswapOrc()
    If the app is running in Debug mode, it will set the NetworkName to "devnet". If it is running in Release mode, it will set the NetworkName to "mainnet".
  • void LoadFromConfiguration(IDictionary<string,string> configuration)
    Loads these static settings from a config dictionary.
  • void LoadFromConfiguration(string sectionName)
    Loads these static settings from the app.config file for your application, given the section name.
// Set values in code
DaisiStaticSettings.OrcIpAddressOrDomain = "orc.daisinet.com";
DaisiStaticSettings.OrcPort = 443;
DaisiStaticSettings.OrcUseSSL = true;
DaisiStaticSettings.SecretKey = "secret-...";