public void Add(TnfMetadata tnfMetadata)
 {
     Add(new object[]
     {
         tnfMetadata.MetaKey,
         tnfMetadata.MetaValue
     });
 }
 public int Update(TnfMetadata tnfMetadata)
 {
     return(Update(new object[]
     {
         tnfMetadata.MetaKey,
         tnfMetadata.MetaValue
     }));
 }
        private static TnfMetadata ReadObject(IDataRecord reader)
        {
            var tnfMetadata = new TnfMetadata();

            tnfMetadata.MetaKey   = reader["meta_key"].FromDbString();
            tnfMetadata.MetaValue = reader["meta_value"].FromDbString();

            return(tnfMetadata);
        }
        public int GetCrs()
        {
            TnfMetadata crsMetadata = Get(MetadataKeyCrs);

            if (crsMetadata == null)
            {
                return(-1);
            }
            string crsString = crsMetadata.MetaValue;

            string[] splitCrsString = crsString.Split(':');
            int      crs;

            if (splitCrsString.Length != 2 || !int.TryParse(splitCrsString[1], out crs))
            {
                return(-1);
            }
            return(crs);
        }