Exemple #1
0
            public bool TryReadAttribute(string name, out LogAnalyserFactoryId value)
            {
                string tmp;

                if (!TryReadAttribute(name, out tmp))
                {
                    value = default(LogAnalyserFactoryId);
                    return(false);
                }

                value = new LogAnalyserFactoryId(tmp);
                return(true);
            }
Exemple #2
0
        private IDataSourceAnalyser CreateAnalyser(LogAnalyserFactoryId factoryId, ILogAnalyserConfiguration configuration)
        {
            try
            {
                if (factoryId != LogAnalyserFactoryId.Empty)
                {
                    return(_analyser.Add(factoryId, configuration));
                }

                Log.DebugFormat("Widget '{0}' doesn't specify a log analyser, none will created", factoryId);
                return(new NoAnalyser());
            }
            catch (Exception e)
            {
                Log.ErrorFormat("Caught unexpected exception while creating log analyser for widget '{0}': {1}", factoryId, e);
                return(new NoAnalyser(factoryId));
            }
        }
Exemple #3
0
 /// <inheritdoc />
 public bool TryReadAttribute(string name, out LogAnalyserFactoryId value)
 {
     return(_documentReader.TryReadAttribute(name, out value));
 }
Exemple #4
0
 /// <inheritdoc />
 public void WriteAttribute(string name, LogAnalyserFactoryId value)
 {
     WriteAttribute(name, value.ToString());
 }
Exemple #5
0
 public NoAnalyser(LogAnalyserFactoryId factoryId)
 {
     _id        = AnalyserId.CreateNew();
     _factoryId = factoryId;
 }