示例#1
0
 private FetClassIdentify[] GetFetClassIdentify(ICatalogEntity[] fetclasses)
 {
     if (fetclasses == null || fetclasses.Length == 0)
     {
         return(null);
     }
     FetClassIdentify[] fetcIds = new FetClassIdentify[fetclasses.Length];
     for (int i = 0; i < fetclasses.Length; i++)
     {
         fetcIds[i] = new FetClassIdentify(fetclasses[i].Id, fetclasses[i].Name, fetclasses[i].Description);
     }
     return(fetcIds);
 }
示例#2
0
        private static FeatureDataSourceBase GetDataSource(CatalogNetFeatureClass catalogNetFeatureClass)
        {
            string           uri        = null;
            InstanceIdentify instanceId = null;

            if (catalogNetFeatureClass.Parent is CatalogNetFeatureDataset)
            {
                instanceId = catalogNetFeatureClass.Parent.Parent.Tag as InstanceIdentify;
                uri        = catalogNetFeatureClass.Parent.Parent.Parent.Tag.ToString();//CatalogNetServer
                //                                        CatalogNetFeatureDataset.CatalogNetInstance.CatalogNetServer
            }
            else
            {
                instanceId = catalogNetFeatureClass.Parent.Tag as InstanceIdentify;
                uri        = catalogNetFeatureClass.Parent.Parent.Tag.ToString();//CatalogNetServer
                //                                         CatalogNetFeatureClass.CatalogInstance.CatalogNetServer
            }
            FetClassIdentify fetclassId = catalogNetFeatureClass.Tag as FetClassIdentify;

            return(new ServerDataSource(catalogNetFeatureClass.Name, uri, instanceId, fetclassId));
        }