/// <summary> /// Compares two specifications. /// </summary> public static void Compare() { if (Settings.Instance == null) { throw new ArgumentNullException("settings"); } Logger.Instance.Log(Category.Info, Resources.AutoRestCore, Version); Modeler modeler = ExtensionsLoader.GetModeler(); try { IEnumerable <ComparisonMessage> messages = modeler.Compare(); foreach (var message in messages) { Logger.Instance.Log(message); } } catch (Exception exception) { throw ErrorManager.CreateError(Resources.ErrorGeneratingClientModel, exception); } }
/// <summary> /// Compares two specifications. /// </summary> public static void Compare() { if (Settings.Instance == null) { throw new ArgumentNullException("settings"); } Logger.Entries.Clear(); Logger.LogInfo(Resources.AutoRestCore, Version); Modeler modeler = ExtensionsLoader.GetModeler(); try { IEnumerable <ComparisonMessage> messages = modeler.Compare(); foreach (var message in messages) { Logger.Entries.Add(new LogEntry(message.Severity, message.ToString())); } } catch (Exception exception) { throw ErrorManager.CreateError(exception, Resources.ErrorGeneratingClientModel, exception.Message); } }