Example #1
0
        public Auditor()
        {
            string location = HostLocation();

            m_settings           = AuditorSettings.Load(location);
            BuildAuditLogMessage = new T();
        }
Example #2
0
 public AuditContext CreateContext(AuditorSettings settings)
 {
     if (settings != null)
     {
         return(new AuditContext(settings.ConnectionString, settings.GetQueryTimeoutSeconds()));
     }
     return(new AuditContext());
 }
Example #3
0
 public AuditContext CreateContext(AuditorSettings settings)
 {
     if (settings != null)
     {
         return new AuditContext(settings.ConnectionString, settings.GetQueryTimeoutSeconds());
     }
     return new AuditContext();
 }
Example #4
0
        public static AuditorSettings Load(string path)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(AuditorSettings));

            using (Stream stream = File.OpenRead(path))
            {
                AuditorSettings settings = (AuditorSettings)serializer.Deserialize(stream);
                return(settings);
            }
        }