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

LoadInstallConfigFromStream() public method

Loads the installation configuration from a stream.
public LoadInstallConfigFromStream ( Stream istrm ) : InstalledApplication
istrm Stream
return InstalledApplication
        public InstalledApplication LoadInstallConfigFromStream(Stream istrm)
        {
            try
            {
                using (XmlTextReader reader = new XmlTextReader(istrm))
                {
                    DataContractSerializer serializer = new DataContractSerializer(typeof(InstalledApplication));
                    return (InstalledApplication)serializer.ReadObject(reader, false);
                }
            }
            catch (Exception e)
            {
                throw ServiceResultException.Create(StatusCodes.BadDecodingError, e, "Could not parse install configuration.");
            }
        }