ArcGISCompare.GeoDbProcs.GetAttributeCounts C# (CSharp) Метод

GetAttributeCounts() статический приватный Метод

static private GetAttributeCounts ( IWorkspace theWS, String which, String theFCName, String fieldN, esriFieldType theT ) : int
theWS IWorkspace
which String
theFCName String
fieldN String
theT esriFieldType
Результат int
    internal static int GetAttributeCounts(IWorkspace theWS, String which, String theFCName, String fieldN, esriFieldType theT)
    {
      ISQLSyntax theS = (ISQLSyntax)theWS;
      IFeatureClass theFC = GetFeatureClass(theWS, theFCName);
      String fieldName = theS.GetSpecialCharacter(esriSQLSpecialCharacters.esriSQL_DelimitedIdentifierPrefix) + fieldN + theS.GetSpecialCharacter(esriSQLSpecialCharacters.esriSQL_DelimitedIdentifierSuffix);

      IQueryFilter theQF = new QueryFilterClass();
      switch (theT)
      {
        case esriFieldType.esriFieldTypeString:
          theQF.WhereClause = fieldName + " IS NOT NULL AND " + fieldName + " <> ''";
          break;
        case esriFieldType.esriFieldTypeInteger:
        case esriFieldType.esriFieldTypeDouble:
          theQF.WhereClause = fieldName + " IS NOT NULL AND " + fieldName + " <> 0";
          break;
      }

      return theFC.FeatureCount(theQF);
    }