当前位置: 首页>>代码示例>>C#>>正文


C# Server.GetDatasetCount方法代码示例

本文整理汇总了C#中Server.GetDatasetCount方法的典型用法代码示例。如果您正苦于以下问题:C# Server.GetDatasetCount方法的具体用法?C# Server.GetDatasetCount怎么用?C# Server.GetDatasetCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server的用法示例。


在下文中一共展示了Server.GetDatasetCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Load

        protected override ModelNode[] Load()
        {
            String strCacheDir = Dapple.MainForm.Settings.CachePath;
            Directory.CreateDirectory(strCacheDir);
            m_oServer = new Server(m_oUri.ToBaseUri(), strCacheDir, DapServerRootModelNode.DAPSecureToken, true);

            if (m_oServer.Status != Server.ServerStatus.OnLine)
            {
                throw new DapException("Server is " + m_oServer.Status.ToString());
            }

            m_oServer.GetDatasetCount(m_oModel.SearchBounds_DAP, m_oModel.SearchKeyword);

            DapBrowserMapModelNode oBrowserMap = new DapBrowserMapModelNode(m_oModel, m_oServer);
            m_blBrowserMapAvailable = oBrowserMap.PassesFilter;

            m_strTitle = m_oServer.Name;
            m_blEntireCatalogMode = m_oServer.MajorVersion < 6 || (m_oServer.MajorVersion == 6 && m_oServer.MinorVersion < 3);

            List<ModelNode> result = new List<ModelNode>();

            if (DisplayBrowserMap)
            {
                result.Add(oBrowserMap);
            }

            String strEdition;
            CatalogFolder folder = null;

            // --- Make three attempts to get the catalog hierarchy root ---
            for (int attempt = 0; attempt < 3; attempt++)
            {
                folder = s_oCCM.GetCatalogHierarchyRoot(m_oServer, m_oModel.SearchBounds_DAP, m_oModel.SearchBoundsSet, m_oModel.SearchKeywordSet, m_oModel.SearchKeyword, out m_blEntireCatalogMode, out strEdition);
                if (folder != null) break;
                Thread.Sleep(5000);
            }
            if (folder == null) throw new Exception("Catalog hierarchy root was inaccessible. Try refreshing the server.");

            foreach (CatalogFolder oSubFolder in folder.Folders)
                result.Add(new DapDirectoryModelNode(m_oModel, oSubFolder));

            while (!DapServerModelNode.s_oCCM.bGetDatasetList(m_oServer, folder.Hierarchy, folder.Timestamp, m_oModel.SearchBounds_DAP, m_oModel.SearchBoundsSet, m_oModel.SearchKeywordSet, m_oModel.SearchKeyword))
            { }

            FolderDatasetList oDatasets = DapServerModelNode.s_oCCM.GetDatasets(m_oServer, folder, m_oModel.SearchBounds_DAP, m_oModel.SearchBoundsSet, m_oModel.SearchKeywordSet, m_oModel.SearchKeyword);
            if (oDatasets == null) throw new Exception("Dataset list was inaccessible. Try refreshing the server.");

            foreach (DataSet oDataset in oDatasets.Datasets)
                result.Add(new DapDatasetModelNode(m_oModel, oDataset));

            return result.ToArray();
        }
开发者ID:paladin74,项目名称:Dapple,代码行数:52,代码来源:DapModelNodes.cs

示例2: GetDatasetCount

 /// <summary>
 /// Get the dataset counts for this server
 /// </summary>
 /// <param name="oServer"></param>
 internal void GetDatasetCount(Server oServer)
 {
     if (!m_bAOIFilter && !m_bTextFilter)
     oServer.GetDatasetCount(null, null);
      else if (!m_bAOIFilter && m_bTextFilter)
     oServer.GetDatasetCount(null, m_strSearchString);
      else if (m_bAOIFilter && !m_bTextFilter)
     oServer.GetDatasetCount(m_oCatalogBoundingBox, null);
      else if (m_bAOIFilter && m_bTextFilter)
     oServer.GetDatasetCount(m_oCatalogBoundingBox, m_strSearchString);
 }
开发者ID:paladin74,项目名称:Dapple,代码行数:15,代码来源:ServerTree.cs


注:本文中的Server.GetDatasetCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。