ArcGISCompare.GeoDbProcs.GetAttributeMetadata C# (CSharp) Method

GetAttributeMetadata() static private method

static private GetAttributeMetadata ( IWorkspace theWS, String theFC, AttributeData theD ) : string
theWS IWorkspace
theFC String
theD AttributeData
return string
    internal static string GetAttributeMetadata(IWorkspace theWS, String theFC, AttributeData theD)
    {
      String theFDef = "None Metadata Found";
      IPropertySet curPS;
      int Index = -1;

      try
      {
        IFeatureClass theFClass = GetFeatureClass(theWS, theFC);
        IDataset theDS = (IDataset)theFClass;
        IFeatureClassName FCN = (IFeatureClassName)theDS.FullName;

        Index = theFClass.Fields.FindField(theD.Name);

        IMetadata MasMeta = (IMetadata)FCN;
        MasMeta.Synchronize(esriMetadataSyncAction.esriMSAAlways, 1);
        curPS = MasMeta.Metadata;

        object[] theO = (object[])curPS.GetProperty("eainfo/detailed/attr[" + Index.ToString() + "]/attrdef");

        object theS = theO[0];
        return theS.ToString();
      }
      catch (Exception ex) { }

      return theFDef;
    }
  }