Beispiel #1
0
 public override bool Exists(DataFileId fileId)
 {
     if (fileId != DataFileId.KeyTermRenderingInfo)
     {
         throw new ArgumentException("Unexpected DataFileId '" + fileId + "'passed to Exists method.", "fileId");
     }
     return(Data != null);
 }
Beispiel #2
0
 protected override void Write(DataFileId fileId, string data)
 {
     if (fileId != DataFileId.KeyTermRenderingInfo)
     {
         throw new ArgumentException("Unexpected DataFileId '" + fileId + "'passed to Write method.", "fileId");
     }
     Data = data;
 }
Beispiel #3
0
 public override string Read(DataFileId fileId)
 {
     if (fileId != DataFileId.KeyTermRenderingInfo)
     {
         throw new ArgumentException("Unexpected DataFileId '" + fileId + "'passed to Read method.", "fileId");
     }
     return(Data);
 }
        protected static string GetFileName(DataFileId fileId)
        {
            switch (fileId)
            {
            case DataFileId.Translations: return("Translations of Checking Questions.xml");

            case DataFileId.QuestionCustomizations: return("Question Customizations.xml");

            case DataFileId.PhraseSubstitutions: return("Phrase substitutions.xml");

            case DataFileId.KeyTermRenderingInfo: return("Key term rendering info.xml");

            case DataFileId.TermRenderingSelectionRules: return("Term rendering selection rules.xml");

            default:
                throw new ArgumentException("Bogus", nameof(fileId));
            }
        }
Beispiel #5
0
 public override DateTime ModifiedTime(DataFileId fileId)
 {
     throw new NotImplementedException();
 }
 protected abstract void Write(DataFileId fileId, string data);
 public void Write <T>(DataFileId fileId, T data) =>
 Write(fileId, XmlSerializationHelper.SerializeToString(CheckDataIsXmlSerializable(data), Encoding.UTF8));
 public override DateTime ModifiedTime(DataFileId fileId)
 {
     return(m_getPlugInDataModifiedTime(GetFileName(fileId)));
 }
 public override string Read(DataFileId fileId)
 {
     return(m_getPlugInData(GetFileName(fileId)) ?? string.Empty);
 }
 public override bool Exists(DataFileId fileId)
 {
     return(m_getPlugInDataModifiedTime(GetFileName(fileId)).Ticks > 0);
 }
 protected override void Write(DataFileId fileId, string data)
 {
     m_putPlugInData(GetFileName(fileId), data);
 }
 public abstract DateTime ModifiedTime(DataFileId fileId);
 public abstract bool Exists(DataFileId fileId);
 public abstract string Read(DataFileId fileId);
 public abstract void Write(DataFileId fileId, string data);