public ObjectDataset(IRow pRow) { _id = pRow.OID; _name = FeatureHelper.GetRowValue(pRow, "Dataset").ToString(); _baseName = FeatureHelper.GetRowValue(pRow, "BaseName").ToString(); _aliasName = FeatureHelper.GetRowValue(pRow, "AliasName").ToString(); }
public ObjectTemplate(IRow pRow) { _id = pRow.OID; _name = FeatureHelper.GetRowValue(pRow, "TemplateName").ToString(); _baseName = FeatureHelper.GetRowValue(pRow, "BaseName").ToString(); _aliasName = FeatureHelper.GetRowValue(pRow, "AliasName").ToString(); _datasetName = FeatureHelper.GetRowValue(pRow, "Dataset").ToString(); _geometryTypeName = FeatureHelper.GetRowValue(pRow, "GeometryType").ToString(); _geometryTypeName = string.IsNullOrEmpty(_geometryTypeName)?"Point":_geometryTypeName; _featureTypeName = FeatureHelper.GetRowValue(pRow, "FeatureType").ToString(); _featureTypeName = string.IsNullOrEmpty(_featureTypeName) ? "Simple" : _featureTypeName; _geometryType = GeometryHelper.ConvertFromString(_geometryTypeName); _featureType = FeatureHelper.ConvertStringToFeatureType(_featureTypeName); _fieldDefValues = FeatureHelper.GetRowValue(pRow, "FieldDefs").ToString(); if (string.IsNullOrEmpty(_fieldDefValues)) { _fields = new List <YTField>(); } else { _fields = JsonConvert.DeserializeObject <List <YTField> >(_fieldDefValues); } }
public YTDomain(IRow pRow) { _id = pRow.OID; _name = FeatureHelper.GetRowValue(pRow, "DomainName").ToString(); _description = FeatureHelper.GetRowValue(pRow, "DomainDescription").ToString(); _domainValues = FeatureHelper.GetRowValue(pRow, "DomainValues").ToString(); if (string.IsNullOrEmpty(_domainValues)) { _valuePairs = new List <YTDomainValue>(); } else { _valuePairs = JsonConvert.DeserializeObject <List <YTDomainValue> >(_domainValues); } }
public YTField(IRow pRow) { _id = pRow.OID; _name = FeatureHelper.GetRowValue(pRow, "FieldName").ToString(); _aliasName = FeatureHelper.GetRowValue(pRow, "AliasName").ToString(); _length = ConvertHelper.ObjectToInt(FeatureHelper.GetRowValue(pRow, "FieldLength")); _precision = ConvertHelper.ObjectToInt(FeatureHelper.GetRowValue(pRow, "FieldPrecision")); _fieldTypeName = FeatureHelper.GetRowValue(pRow, "FieldType").ToString(); _fieldType = FieldHelper.ConvertFromSimpleString(_fieldTypeName); string allowNullStr = FeatureHelper.GetRowValue(pRow, "AllowNull").ToString(); _allowNull = string.IsNullOrEmpty(allowNullStr) || allowNullStr.ToUpper().StartsWith("T") || allowNullStr == "真"; string keyStr = FeatureHelper.GetRowValue(pRow, "IsKey").ToString(); _isKey = string.IsNullOrEmpty(keyStr) == false || (keyStr.ToUpper().StartsWith("T") == true ? true : false); _domain = FeatureHelper.GetRowValue(pRow, "FieldDomain").ToString(); _defaultValue = FeatureHelper.GetRowValue(pRow, "DefaultValue").ToString(); }