Example #1
0
        public static Destination GetDestination(RfcConfigParameters configParameters)
        {
            string serverKey = ServerConfiguration.AddServerDestination(configParameters);

            lock (serverConfigurationRegistrationLock) {
                if (!serverConfigurationRegistered)
                {
                    RfcDestinationManager.RegisterDestinationConfiguration(new ServerConfiguration());
                    serverConfigurationRegistered = true;
                }
            }

            if (ServerConfiguration.HasServerKey(serverKey))
            {
                Destination destination = new Destination()
                {
                    InUse          = true,
                    InUseSince     = DateTime.Now,
                    ServerKey      = serverKey,
                    Suffix         = String.Empty,
                    RfcDestination = RfcDestinationManager.GetDestination(serverKey)
                };

                return(destination);
            }

            return(null);
        }