Ejemplo n.º 1
0
        static dynamic IBSGateway(string path, string login)
        {
            // this does not work with .NET Core 2.0

            // Attempt to get the latest gateway version registered on the server
            string latestGateway = GatewayHelper.GetLatestRegisteredGateway();

            if (string.IsNullOrWhiteSpace(latestGateway))
            {
                throw new Exception("A registered gateway could not be found");
            }
            // Create the gateway object
            Type    gatewayType = Type.GetTypeFromProgID(latestGateway);
            dynamic gw          = Activator.CreateInstance(gatewayType);

            gw.Init();
            gw.setpath(path);
            gw.login(login);

            return(gw);
        }