Beispiel #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="OpcDaServer" /> class.
        /// </summary>
        /// <param name="uri">The server URI.</param>
        public OpcDaServer(Uri uri)
        {
            UrlValidator.CheckOpcUrl(uri);

            Uri             = uri;
            ComProxyBlanket = ComProxyBlanket.Default;

            var shutdown = new OpcShutdown();

            shutdown.Shutdown    += OnShutdown;
            ComWrapper.RpcFailed += OnRpcFailed;

            _shutdownConnectionPoint = new ConnectionPoint <IOPCShutdown>(shutdown);
            _clientName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
        }