The EnvironmentManager is the top class for the MIP Environment. The class can always be accessed though: EnvironmentManager.Instance As it is a singleton. More...
Public Types | |
enum | MessageReceiverHint { None , AvoidAsync } |
Gives a hint about how to call the message receiver method. More... | |
Public Member Functions | |
void | ExceptionDialog (String nameOfClass, String where, Exception exception) |
Opens an ExceptionDialog to the user with a formatted layout of the exception itself. | |
void | ExceptionDialog (String where, Exception exception) |
Opens an ExceptionDialog to the user with a formatted layout of the exception itself. | |
void | ExceptionHandler (String nameOfClass, String where, Exception exception) |
Common exception handler. Logs the incident into the Log and opens the ExceptionDialog to the user. | |
void | ExceptionHandler (String where, Exception exception) |
Common exception handler. Logs the incident into the Log and opens the ExceptionDialog to the user. | |
void | FireEnvironmentOptionsChangedEvent () |
Applications changing the EnvironmentOptions dictionary, should call this method. | |
virtual Item | GetSiteItem (FQID fqid) |
Get the Item representing a specific site / island. The fqid is the id of a XProtect Management server. | |
virtual Item | GetSiteItem (Guid id) |
Get the Item representing a specific site / island. The id is the id of a XProtect Management server. | |
virtual bool | HasCapability (String capability) |
Can be used to check if the product supports a given capability Check EnvironmentCapabilities for available capabilities. | |
virtual void | Log (bool error, String where, [Localizable(false)] String text) |
Logs a message. | |
virtual void | Log (bool error, String where, [Localizable(false)] String text, object[] args) |
Logs a message. | |
virtual void | Log (String nameOfClass, bool error, String where, [Localizable(false)] String text, object[] args) |
Logs a message in a Debug log. | |
virtual void | PostMessage (Message message) |
Overloaded method if both destination and sender == null. | |
virtual void | PostMessage (Message message, FQID destination) |
Overloaded message if sender == null. | |
void | PostMessage (Message message, FQID destination, FQID sender) |
Post a Message. Similar method as SendMessage except that there is not result value. | |
object | RegisterReceiver (MessageReceiver messageReceiver, MessageFilter messageFilter) |
Register a method to receive messages. | |
virtual object | RegisterReceiver (MessageReceiver messageReceiver, MessageFilter messageFilter, MessageReceiverHint hint) |
Register a method to receive messages with a hint about how to launch the message. | |
virtual Collection< object > | SendMessage (Message message) |
Overloaded method to be used if both destination and sender == null. | |
virtual Collection< object > | SendMessage (Message message, FQID destination) |
Overloaded method to be used if sender==null. | |
Collection< object > | SendMessage (Message message, FQID destination, FQID sender) |
Send a Message. All receivers will be called before the call returns. Message id's and formatted Data field are found in namespace VideoOS.Platform.Messaging for the Milestone defined messages. | |
void | UnRegisterReceiver (object registeredReceiver) |
UnRegister a MessageReceiver. | |
Protected Member Functions | |
virtual void | Init () |
Initializes the environment. | |
virtual void | Init (IDictionary< string, Color > brandColors) |
Initializes the environment. | |
Properties | |
virtual List< PluginDefinition > | AllPluginDefinitions [get] |
Returns a list of all loaded MIP Plug-ins. | |
bool | ApplicationLoggedOn [get] |
Indicate if the application is currently logged on. | |
virtual FQID | CurrentSite [get] |
Get the Item that represent the server currently selected (May only be relevant for XProtect management client) | |
bool | DebugLoggingEnabled = false [get, set] |
Tells whether debug logs (log commands with error == false) should be written to the log file. Default is false. | |
bool | DebugTelemetryLoggingEnabled = false [get, set] |
Tells whether telemetry debug logs should be written to the log file. Default is false. | |
virtual bool | EnableConfigurationChangedService [get, set] |
Set this if you want to receive the Messaging.MessageId.Server.ConfigurationChangedIndication messages. When this is true, a service will poll the plug-in configuration server every 60 second for changes and send the message if anything changed in plug-in configurations. The message being sent is Messaging.MessageId.Server.ConfigurationChangedIndication, where the Message.RelatedFQID contains the top node of what was changed. Often you can just check if the Message.RelatedFQID.Kind matches one of your kinds. | |
virtual Dictionary< string, string > | EnvironmentOptions [get] |
Used to control specific environment behavior. For dynamic options, call the FireEnvironmentOptionsChangedEvent method to let the system know it was changed. | |
virtual String | EnvironmentProduct [get] |
Identifies the current product executing. | |
virtual EnvironmentType | EnvironmentType [get] |
Identifies the current executing Environment. | |
static EnvironmentManager | Instance [get, set] |
This Singleton item of this class. Only the 'get' access should be used. | |
virtual License.LicenseManager | LicenseManager [get] |
Helps the plug-in with checking current use of licenses. | |
virtual String | LoginAuthType [get, set] |
Defines the type of authentication stored in the LoginNetworkCredential property. This property can be used to construct a credentialCache. Values are defined in VideoOS.Platform.Login.AuthenticationType: "Negotiate" for Active Directory, Windows and local system defined users "Basic" for basic users "External" for user defined on an external IDP, e.g. 3rd party OAuth service | |
virtual ICredentials | LoginCredentialCache [get, set] |
The Credential cache for all types of authorizations. Notice: Only valid in Smart Client from version 7.0b. | |
virtual NetworkCredential | LoginNetworkCredential [get, set] |
The credential used when connecting with Windows, WindowsDefault or basic user authorization. | |
virtual FQID | MasterSite [get] |
Get the Item that represent the server that was logged in to. | |
bool | MeasureSendPostHandlers [get, set] |
Creates an ElapseTimer class and measures how much time each message handler is using. (Implemented for Event Server only in 2019 R3) The MIP SDK Tray Manager can display the results. | |
List< String > | MessageIdList [get] |
List of all known MessageIds. This includes all the message id's defined by the PlatformPlugin and environment as well as for all loaded plug-ins. | |
virtual Mode | Mode [get, set] |
The Mode the environment is executing right now. | |
bool | PluginInitializationInProgress [get, set] |
Identifies if the plugin load process in progress. | |
virtual bool | SmartClientInOfflineMode [get, set] |
Determines if the Smart Client is executing after an export, and therefor is running in Offline mode. In Offline mode, it will not be possible to contact any servers for additional information. Make sure to export all relevant material during the Export process. | |
virtual string | SmartClientOfflineDirectory [get, set] |
When Smart Client is running in offline mode, this property defines the root directory for the exported data. | |
virtual SystemLicense | SystemLicense [get] |
SystemLicense contains general information about the license for the XProtect system. | |
bool | TraceFunctionCalls [get, set] |
Set this bool if you like to have a line of trace written for all calls to all plug-ins. The trace lines are written to the respective debug logs for the environment. | |
bool | TraceMessageCommunication [get, set] |
Set this bool if you like to have a lot of trace lines about how message communication works. The trace lines are written to the respective debug logs for the environment. | |
bool | TracePlaybackDetails [get, set] |
Make deeper log entries for playback (MIPSDK 2016 - just for stand alone MIP Environment) | |
bool | TraceSendDetails [get, set] |
Make deeper log entries for send message / post message (MIPSDK 2016 - just for stand alone MIP Environment) | |
static bool | UsingUserContext [get, set] |
This field identifies if the current stand alone environment is using multi-user context. | |
Events | |
EventHandler | EnvironmentOptionsChangedEvent |
This event is used for components that need to change behavior when an option has been modified. | |
The EnvironmentManager is the top class for the MIP Environment. The class can always be accessed though: EnvironmentManager.Instance As it is a singleton.
The class has identification information of the current environment executing. When executing in XProtect Management Client, the Event Server and the Smart Client, the EnvironmentManager is created by the main application, while when executing in a stand-alone application, the SDK version of the EnvironmentManager needs to be instantiated by the standalone application.
Please check out the SDK instantiation notes for a complete description of SDK startup.
|
abstract |
Opens an ExceptionDialog to the user with a formatted layout of the exception itself.
nameOfClass | The class being worked on, when the exception happened |
where | Where the Exception happened |
exception | The Exception itself |
|
abstract |
Opens an ExceptionDialog to the user with a formatted layout of the exception itself.
where | Where the Exception happened |
exception | The Exception itself |
|
abstract |
Common exception handler. Logs the incident into the Log and opens the ExceptionDialog to the user.
nameOfClass | The class being worked on, when the exception happened. |
where | Where the Exception happened |
exception | The Exception itself |
|
abstract |
Common exception handler. Logs the incident into the Log and opens the ExceptionDialog to the user.
where | Where the Exception happened |
exception | The Exception itself |
|
inline |
Applications changing the EnvironmentOptions dictionary, should call this method.
Get the Item representing a specific site / island. The fqid is the id of a XProtect Management server.
fqid |
|
inlinevirtual |
Get the Item representing a specific site / island. The id is the id of a XProtect Management server.
id |
|
inlinevirtual |
Can be used to check if the product supports a given capability Check EnvironmentCapabilities for available capabilities.
Supported from 2016
|
inlineprotectedvirtual |
Initializes the environment.
|
inlineprotectedvirtual |
Initializes the environment.
|
inlinevirtual |
Logs a message.
error | True if this is an error |
where | Where the this is coming from, provide class name and method |
text | The message |
|
inlinevirtual |
Logs a message.
error | True if this is an error |
where | Where the this is coming from, provide class name and method |
text | The message |
args | Any relevant parameters |
|
inlinevirtual |
Logs a message in a Debug log.
nameOfClass | The class being worked on. |
error | True if this is an error |
where | Where the this is coming from |
text | The message |
args | Any relevant parameters |
|
inlinevirtual |
Overloaded method if both destination and sender == null.
message |
|
inlinevirtual |
Overloaded message if sender == null.
message | |
destination |
|
abstract |
Post a Message. Similar method as SendMessage except that there is not result value.
message | The message to send |
destination | The destination FQID, if relevant |
sender | The sender, if known |
|
abstract |
Register a method to receive messages.
messageReceiver | The method to be called |
messageFilter | The filter to be used |
|
virtual |
Register a method to receive messages with a hint about how to launch the message.
messageReceiver | The method to be called |
messageFilter | The filter to be used |
hint | Hint to be used when calling the messageReceiver |
|
inlinevirtual |
Overloaded method to be used if both destination and sender == null.
message |
|
inlinevirtual |
Overloaded method to be used if sender==null.
message | |
destination |
|
abstract |
Send a Message. All receivers will be called before the call returns. Message id's and formatted Data field are found in namespace VideoOS.Platform.Messaging for the Milestone defined messages.
message | The message to send |
destination | The destination FQID, if relevant |
sender | The sender, if known |
|
abstract |
UnRegister a MessageReceiver.
registeredReceiver | The object returned from the RegisterReceiver call |
|
get |
Returns a list of all loaded MIP Plug-ins.
|
getabstract |
Indicate if the application is currently logged on.
|
get |
Get the Item that represent the server currently selected (May only be relevant for XProtect management client)
|
getset |
Tells whether debug logs (log commands with error == false) should be written to the log file. Default is false.
Only affects standalone SDK.
|
getset |
Tells whether telemetry debug logs should be written to the log file. Default is false.
Only affects standalone SDK.
|
getset |
Set this if you want to receive the Messaging.MessageId.Server.ConfigurationChangedIndication messages. When this is true, a service will poll the plug-in configuration server every 60 second for changes and send the message if anything changed in plug-in configurations.
The message being sent is Messaging.MessageId.Server.ConfigurationChangedIndication, where the Message.RelatedFQID contains the top node of what was changed. Often you can just check if the Message.RelatedFQID.Kind matches one of your kinds.
|
get |
Used to control specific environment behavior. For dynamic options, call the FireEnvironmentOptionsChangedEvent method to let the system know it was changed.
|
get |
Identifies the current product executing.
|
get |
Identifies the current executing Environment.
|
staticgetset |
This Singleton item of this class. Only the 'get' access should be used.
|
get |
Helps the plug-in with checking current use of licenses.
|
getset |
Defines the type of authentication stored in the LoginNetworkCredential property.
This property can be used to construct a credentialCache.
Values are defined in VideoOS.Platform.Login.AuthenticationType:
"Negotiate" for Active Directory, Windows and local system defined users
"Basic" for basic users
"External" for user defined on an external IDP, e.g. 3rd party OAuth service
|
getset |
The Credential cache for all types of authorizations.
Notice: Only valid in Smart Client from version 7.0b.
|
getset |
The credential used when connecting with Windows, WindowsDefault or basic user authorization.
NOTE: From 2022 R1, this property may be null when the user is using OAuth 2.0 tokens. Try always to use the LoginSettings class instead and check the IsOAuthIdentity == false, before using the NetworkCredential there.
|
get |
Get the Item that represent the server that was logged in to.
|
getset |
Creates an ElapseTimer class and measures how much time each message handler is using. (Implemented for Event Server only in 2019 R3)
The MIP SDK Tray Manager can display the results.
|
getabstract |
List of all known MessageIds. This includes all the message id's defined by the PlatformPlugin and environment as well as for all loaded plug-ins.
A plug-in should add any plug-in defined messages to the plug-ins own PluginDefinition
|
getset |
The Mode the environment is executing right now.
|
getset |
Identifies if the plugin load process in progress.
|
getset |
Determines if the Smart Client is executing after an export, and therefor is running in Offline mode. In Offline mode, it will not be possible to contact any servers for additional information. Make sure to export all relevant material during the Export process.
|
getset |
When Smart Client is running in offline mode, this property defines the root directory for the exported data.
|
get |
SystemLicense contains general information about the license for the XProtect system.
|
getsetabstract |
Set this bool if you like to have a line of trace written for all calls to all plug-ins. The trace lines are written to the respective debug logs for the environment.
|
getset |
Set this bool if you like to have a lot of trace lines about how message communication works. The trace lines are written to the respective debug logs for the environment.
|
getset |
Make deeper log entries for playback (MIPSDK 2016 - just for stand alone MIP Environment)
|
getset |
Make deeper log entries for send message / post message (MIPSDK 2016 - just for stand alone MIP Environment)
|
staticgetset |
This field identifies if the current stand alone environment is using multi-user context.
EventHandler VideoOS.Platform.EnvironmentManager.EnvironmentOptionsChangedEvent |
This event is used for components that need to change behavior when an option has been modified.
Applications changing the EnvironmentOptions dictionary, should call the FireEnvironmentOptionsChangedEvent method.