Microsoft.HockeyApp.HockeyClientWPF.Configure C# (CSharp) Method

Configure() public method

Configures the HockeyAppSDK
ApiBase must not be empty!
public Configure ( string appIdentifier, string appVersionInformation = null, string userID = null, string contactInformation = null, string>.Func descriptionLoader = null, string apiBase = "https://rink.hockeyapp.net", string userAgentString = null, bool keepRunning = false ) : void
appIdentifier string Identifier of the app
appVersionInformation string optional version of the app. If null the executing assembly version is used
userID string optional user id - e.g. the logged in user
contactInformation string optional contact information like an email adress
descriptionLoader string>.Func optional delegate for attaching description information like event logs etc. Can be null.
apiBase string optional: apiBase - if not the standard is used
userAgentString string The user agent string.
keepRunning bool optional: if an unhandled exception is thrown on the dispatcher thread, the system can be kept alive - default is false
return void
        public void Configure(string appIdentifier, 
                            string appVersionInformation = null,
                            string userID = null, 
                            string contactInformation = null,
                            Func<Exception, string> descriptionLoader = null,
                            string apiBase = "https://rink.hockeyapp.net",
                            string userAgentString = null,
                            bool keepRunning = false)
          
        {
            if (String.IsNullOrWhiteSpace(apiBase))
            {
                throw new Exception("ApiBase must not be empty!");
            }

            logger.Info("Configure HockeyClientWPF with appIdentifier={0}, userID={1}, contactInformation={2}, descriptionLoader available{3}, sendCrashesAutomatically={4}, apiBase={5}",
                new object[] { appIdentifier, userID, contactInformation, (descriptionLoader != null).ToString(),apiBase });

            string  myAppVersion= string.IsNullOrEmpty(appVersionInformation)?
                Assembly.GetCallingAssembly().GetName().Version.ToString()
                :appVersionInformation;

            HockeyClient.ConfigureInternal(appIdentifier,
                myAppVersion,
                apiBase: apiBase,
                userID: userID,
                contactInformation: contactInformation,
                userAgentName: HockeyConstants.USER_AGENT_STRING,
                sdkName: HockeyConstants.SDKNAME,
                sdkVersion: HockeyConstants.SDKVERSION,
                os: Environment.OSVersion.Platform.ToString(),
                osVersion: Environment.OSVersion.Version.ToString() + Environment.OSVersion.ServicePack);
            this._crashHandler = new CrashHandler(HockeyClient.Current, descriptionLoader, keepRunning);
        }