Opc.Ua.Configuration.PseudoComServer.DeleteConfiguredEndpointFile C# (CSharp) Method

DeleteConfiguredEndpointFile() private static method

Deletes the file containing the configured endpoint.
private static DeleteConfiguredEndpointFile ( System.Guid clsid ) : void
clsid System.Guid The CLSID.
return void
        private static void DeleteConfiguredEndpointFile(Guid clsid)
        {
            try
            {
                string relativePath = Utils.Format("{0}\\{1}.xml", ComPseudoServersDirectory, clsid);
                string absolutePath = Utils.GetAbsoluteFilePath(relativePath, false, false, false);

                // oops - nothing found.
                if (absolutePath == null)
                {
                    return;
                }

                File.Delete(absolutePath);
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error deleting endpoint configuration for COM Proxy with CLSID={0}.", clsid);
            }
        }