Example #1
0
        /// <summary>
        /// Singleton instance.
        /// </summary>
        public static OneAndOneClient Instance(Configuration config)
        {
            if (instance == null)
            {
                lock (syncRoot)
                {
                    if (instance == null)
                    {
                        instance = new OneAndOneClient(config);
                    }
                }
            }

            return(instance);
        }
        /// <summary>
        /// Singleton instance.
        /// </summary>
        public static OneAndOneClient Instance(string apiUrl = null, string apiKey = null)
        {
            if (instance == null)
            {
                lock (syncRoot)
                {
                    if (instance == null)
                    {
                        instance = new OneAndOneClient(apiUrl, apiKey);
                    }
                }
            }

            return(instance);
        }
        /// <summary>
        /// Singleton instance.
        /// </summary>
        public static OneAndOneClient Instance(string apiUrl = null, string apiKey = null)
        {
            if (instance == null)
            {
                lock (syncRoot)
                {
                    if (instance == null)
                        instance = new OneAndOneClient(apiUrl, apiKey);
                }
            }

            return instance;
        }