CreateNetConfSession() public method

Creates a new INetConfSession in a given ISession and with the specified operation timeout.
public CreateNetConfSession ( ISession session, System.TimeSpan operationTimeout ) : INetConfSession
session ISession The to create the in.
operationTimeout System.TimeSpan The operation timeout.
return INetConfSession
Exemplo n.º 1
0
        /// <summary>
        /// Called when client is connected to the server.
        /// </summary>
        protected override void OnConnected()
        {
            base.OnConnected();

            _netConfSession = ServiceFactory.CreateNetConfSession(Session, OperationTimeout);
            _netConfSession.Connect();
        }
        private INetConfSession CreateAndConnectNetConfSession()
        {
            var netConfSession = ServiceFactory.CreateNetConfSession(Session, _operationTimeout);

            try
            {
                netConfSession.Connect();
                return(netConfSession);
            }
            catch
            {
                netConfSession.Dispose();
                throw;
            }
        }