Opc.Ua.Configuration.ApplicationInstance.LoadInstallConfigFromFile C# (CSharp) Method

LoadInstallConfigFromFile() public method

Loads the installation configuration from a file.
public LoadInstallConfigFromFile ( string filePath ) : InstalledApplication
filePath string
return InstalledApplication
        public InstalledApplication LoadInstallConfigFromFile(string filePath)
        {
            if (filePath == null) throw new ArgumentNullException("filePath");
            
            Stream istrm = null;

            try
            {
                istrm = File.Open(filePath, FileMode.Open, FileAccess.Read);
            }
            catch (Exception e)
            {
                throw ServiceResultException.Create(StatusCodes.BadDecodingError, e, "Could not open file: {0}", filePath);
            }

            return LoadInstallConfigFromStream(istrm);
        }