InfoConnect API Guide
Attachmate.Reflection.Framework Namespace / Application Class / Close Method
Specifies the Save action when closing an InfoConnect application.
Example


In This Topic
    Close Method (Application)
    In This Topic
    Closes the InfoConnect application.
    Syntax
    'Declaration
     
    
    Public Sub Close( _
       ByVal closeOption As ApplicationCloseOption _
    ) 
    'Usage
     
    
    Dim instance As Application
    Dim closeOption As ApplicationCloseOption
     
    instance.Close(closeOption)
    public void Close( 
       ApplicationCloseOption closeOption
    )

    Parameters

    closeOption
    Specifies the Save action when closing an InfoConnect application.
    Example
    This example shows how to close InfoConnect.
    using Attachmate.Reflection.Emulation.IbmHosts;
    using Attachmate.Reflection.Framework;
    using Attachmate.Reflection.UserInterface;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ApplicationInstanceID
    {
        class Program
        {
            private Guid applicationInstanceId;
    
            static public Guid ApplicationInstanceId { get; set; }
    
            static void Main(string[] args)
            {
    
                ApplicationInstanceId = MyReflection.Start();
    
                Application app = MyReflection.CreateApplication();
    
                //Open sessions and perform tasks...
    
    
                //Close InfoConnect
                try
                {
                    app.Close(ApplicationCloseOption.CloseNoSave);
                }
                catch
                {
                    MyReflection.ForceStop(ApplicationInstanceId);
                }
    
    
                Console.ReadLine();
            }
        }
    }
    
    See Also