コード例 #1
0
        private void LoadRecord(string file)
        {
            if (Cached.ContainsKey(Path.GetFileNameWithoutExtension(file)))
            {
                return;
            }
            try
            {
                var record = InvertJsonExtensions.DeserializeObject(For, JSON.Parse(ReadFile(file))) as IDataRecord;
                if (record != null)
                {
                    record.Repository = this.Repository;

                    Cached.Add(record.Identifier, record);
                    record.Changed = false;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Error parsing file {0}", file), ex);
            }
        }