本文整理汇总了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();
}
示例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);
}