public Dataset GetDataset(string gdbDatasetName, IWorkspaceName workspaceName)
        {
            DdxModel model = GetModel(workspaceName);

            Dataset result = model.GetDatasetByModelName(gdbDatasetName);

            return(result);
        }
Ejemplo n.º 2
0
        private static IEnumerable <WorkspaceDataset> GetWorkspaceDatasets(
            DdxModel model, GdbWorkspace primaryWorkspace)
        {
            foreach (IDataset gdbDataset in primaryWorkspace.GetDatasets())
            {
                Dataset modelDataset = model.GetDatasetByModelName(gdbDataset.Name);

                if (modelDataset != null)
                {
                    yield return(new WorkspaceDataset(gdbDataset.Name, null, modelDataset));
                }
            }
        }
Ejemplo n.º 3
0
        private static Dataset GetDataset([NotNull] DdxModel model, string datasetName)
        {
            Dataset dataset = model.GetDatasetByModelName(datasetName);

            if (dataset != null)
            {
                return(dataset);
            }

            // Search all datasets, ignoring qualification

            foreach (Dataset candidate in model.GetDatasets())
            {
                if (CompareUnqualifiedName(datasetName, candidate.Name) == 0)
                {
                    return(candidate);
                }
            }

            return(null);            // not found
        }