Unicorn.Remote.Logging.ProgressReporter.ReportSimple C# (CSharp) Method

ReportSimple() public method

public ReportSimple ( string text, MessageLevel level ) : void
text string
level MessageLevel
return void
        public void ReportSimple(string text, MessageLevel level)
        {
            SendOpeartionMessage(level, text);
        }

Usage Example

        private void ProcessSync(ProgressReporter progress)
        {
            foreach (var configuration in ResolveConfigurations())
            {
                using (new LoggingContext(progress, configuration))
                {
                    try
                    {
                        progress.ReportSimple("Control Panel Sync: Processing Unicorn configuration " +
                                              configuration.Name, MessageLevel.Info);

                        var pathResolver = configuration.Resolve<PredicateRootPathResolver>();
                        var retryer = configuration.Resolve<IDeserializeFailureRetryer>();
                        var consistencyChecker = configuration.Resolve<IConsistencyChecker>();
                        var loader = configuration.Resolve<SerializationLoader>();
                        var roots = pathResolver.GetRootSerializedItems();
                        int index = 1;
                        loader.LoadAll(roots, retryer, consistencyChecker, item =>
                        {
                            progress.ReportProgress((int)((index / (double)roots.Length) * 100));
                            index++;
                        });
                        progress.ReportSimple("Control Panel Sync: Completed syncing Unicorn configuration " +
                                              configuration.Name, MessageLevel.Info);
                    }
                    catch (Exception ex)
                    {
                        progress.Error(ex);
                        break;
                    }
                }
            }
        }