示例#1
0
        private void TestSource_OnClick(object sender, RoutedEventArgs e)
        {
            // push randomly log's event from test source
            //

            var level = RandomGen.GetEnum <LogLevels>();

            switch (level)
            {
            case LogLevels.Inherit:
            case LogLevels.Debug:
            case LogLevels.Info:
            case LogLevels.Off:
                _testSource.AddInfoLog("{0} (source)!!!".Put(level));
                break;

            case LogLevels.Warning:
                _testSource.AddWarningLog("Warning (source)!!!");
                break;

            case LogLevels.Error:
                _testSource.AddErrorLog("Error (source)!!!");
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }