Exemplo n.º 1
0
        /// <summary>
        /// Loads the server collection.
        /// </summary>
        private void Load()
        {
            if (Invalid)
            {
                IsInitialized = false;
            }

            if (!IsInitialized)
            {
                IntPointer lastError = new IntPointer();
                Collection = new System.Collections.Generic.List <OlapServer>(0);
                System.Collections.Specialized.StringCollection serverNames = NativeOlapApi.Servers(_store.ClientSlot, lastError);
                if (serverNames != null)
                {
                    for (int i = 0; i < serverNames.Count; i++)
                    {
                        Collection.Add(new OlapServer(_store, serverNames[i]));
                    }
                }
                Invalid       = false;
                IsInitialized = true;
            }
        }