/// <summary> /// Initializes a new instance of the <see cref="AssetLogMessage" /> class. /// </summary> /// <param name="package">The package.</param> /// <param name="assetReference">The asset reference.</param> /// <param name="type">The type.</param> /// <param name="messageCode">The message code.</param> /// <exception cref="System.ArgumentNullException">asset</exception> public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode) { this.package = package; AssetReference = assetReference; Type = type; MessageCode = messageCode; Related = new List<IReference>(); Text = AssetMessageStrings.ResourceManager.GetString(messageCode.ToString()) ?? messageCode.ToString(); }
/// <summary> /// Initializes a new instance of the <see cref="AssetLogMessage" /> class. /// </summary> /// <param name="package">The package.</param> /// <param name="assetReference">The asset reference.</param> /// <param name="type">The type.</param> /// <param name="messageCode">The message code.</param> /// <param name="arguments">The arguments.</param> /// <exception cref="System.ArgumentNullException">asset</exception> public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode, params object[] arguments) { this.package = package; AssetReference = assetReference; Type = type; MessageCode = messageCode; Related = new List<IReference>(); var message = AssetMessageStrings.ResourceManager.GetString(messageCode.ToString()) ?? messageCode.ToString(); Text = string.Format(message, arguments); }
/// <summary> /// Initializes a new instance of the <see cref="AssetLogMessage" /> class. /// </summary> /// <param name="package">The package.</param> /// <param name="assetReference">The asset reference.</param> /// <param name="type">The type.</param> /// <param name="messageCode">The message code.</param> /// <exception cref="System.ArgumentNullException">asset</exception> public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode) { this.package = package; AssetReference = assetReference; Type = type; MessageCode = messageCode; Related = new List <IReference>(); Text = AssetMessageStrings.ResourceManager.GetString(messageCode.ToString()) ?? messageCode.ToString(); }
/// <summary> /// Initializes a new instance of the <see cref="AssetLogMessage" /> class. /// </summary> /// <param name="package">The package.</param> /// <param name="assetReference">The asset reference.</param> /// <param name="type">The type.</param> /// <param name="messageCode">The message code.</param> /// <param name="arguments">The arguments.</param> /// <exception cref="System.ArgumentNullException">asset</exception> public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode, params object[] arguments) { this.package = package; AssetReference = assetReference; Type = type; MessageCode = messageCode; Related = new List <IReference>(); var message = AssetMessageStrings.ResourceManager.GetString(messageCode.ToString()) ?? messageCode.ToString(); Text = string.Format(message, arguments); }