/// <summary> /// Initializes the SDK if it hasn't already. /// </summary> /// <remarks> /// <span style="color: red;">Manual manipulation of the SDK state is /// <strong>not supported by the CoraleStudios team</strong> and may /// result in <emph>undefined behaviour</emph>. Usage of this method is /// <strong>at your own risk</strong>.</span> /// </remarks> public void Initialize() { if (Initialized) { return; } Log.Info("Chroma is initializing."); Log.Debug("Retrieving SDK version"); var versionSuccess = RegistryHelper.TryGetSdkVersion(out _sdkVersion); if (versionSuccess) { Log.InfoFormat("Colore is running against SDK version {0}.", SdkVersion); } else { Log.Warn("Failed to retrieve SDK version from registry!"); } Log.Debug("Calling SDK Init function"); NativeWrapper.Init(); Initialized = true; Log.Debug("Resetting _registeredHandle"); _registeredHandle = IntPtr.Zero; }
/// <summary> /// Prevents a default instance of the <see cref="Chroma" /> class from being created. /// </summary> private Chroma() { Log.Info("Chroma is initializing."); Log.Debug("Calling SDK Init function"); NativeWrapper.Init(); Log.Debug("Resetting _registeredHandle"); _registeredHandle = IntPtr.Zero; }
/// <summary> /// Initializes the SDK if it hasn't already. /// </summary> /// <remarks> /// <span style="color: red;">Manual manipulation of the SDK state is /// <strong>not supported by the CoraleStudios team</strong> and may /// result in <emph>undefined behaviour</emph>. Usage of this method is /// <strong>at your own risk</strong>.</span> /// </remarks> public void Initialize() { if (Initialized) { return; } Log.Info("Chroma is initializing."); Log.Debug("Calling SDK Init function"); NativeWrapper.Init(); Initialized = true; Log.Debug("Resetting _registeredHandle"); _registeredHandle = IntPtr.Zero; }
/// <summary> /// Prevents a default instance of the <see cref="Chroma" /> class from being created. /// </summary> private Chroma() { NativeWrapper.Init(); _registeredHandle = IntPtr.Zero; }