public void UpgradeLibrary( BaseLibraryConnection connection, string password, bool rememberPassword )
Parameters
- connection
- Connection to the library.
- password
- Password.
- rememberPassword
- Remember the password?
public void UpgradeLibrary( BaseLibraryConnection connection, string password, bool rememberPassword )
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.HpdApiNotInitializedException | Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it. |
EPLAN.Harness.API.Exceptions.FileNotFoundException | This file was not found. |
EPLAN.Harness.API.Exceptions.FileExtensionException | The exception that is thrown when the file has the wrong extension. |
EPLAN.Harness.API.Exceptions.ArgumentException | Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property. |
EPLAN.Harness.API.Exceptions.ArgumentNullException | Argument is null. |
EPLAN.Harness.API.Exceptions.SecurityException | The exception that is thrown when there is a problem with security. |
EPLAN.Harness.API.Exceptions.ConnectionException | The exception that is thrown when there is a problem with the connection of an occurrence. |
Only up-to-date library can be connected and used.
Use if the ConnectToLibrary(BaseLibraryConnection,String,Boolean) method throws the EPLAN.Harness.API.Exceptions.LibraryVersionException.
Must be called within the Library application.
After this method is called the library is only upgraded, not connected.
Library library = Library.GetInstance();
// Create new connection or get any recent connection.
BaseLibraryConnection connection = ...
library.UpgradeLibrary(connection);
Library library = Library.GetInstance(); // Create new connection or get any recent connection. BaseLibraryConnection connection = ... // The password will be remembered for next time. library.UpgradeLibrary(connection, "password", true);