예제 #1
0
 /// <summary>
 /// Dispatches a <see cref="ValidationLog"/> instance via <see cref="LogCreated"/>.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="type"></param>
 /// <param name="message"></param>
 protected void DispatchLogEvent(Object obj, LogType type, string message)
 {
     LogCreated?.Invoke(new ValidationLog
     {
         logType       = type,
         validatorName = TypeName,
         message       = message,
         objectPath    = ObjectTools.GetObjectPath(obj)
     });
 }
 protected void DispatchVLogEvent(Object obj,
                                  LogType type,
                                  string message,
                                  string scenePath = "",
                                  LogSource source = LogSource.Scene)
 {
     LogCreated?.Invoke(new ValidationLog
     {
         logType       = type,
         source        = source,
         validatorName = TypeName,
         message       = message,
         objectPath    = ObjectTools.GetObjectPath(obj),
         scenePath     = scenePath
     });
 }
 /// <summary>
 /// Dispatches a <see cref="ValidationLog"/> instance via <see cref="LogCreated"/>.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="type"></param>
 /// <param name="message"></param>
 /// <param name="scenePath"></param>
 /// <param name="objectPath"></param>
 protected void DispatchLogEvent(
     Object obj,
     LogType type,
     string message,
     string scenePath,
     string objectPath)
 {
     LogCreated?.Invoke(new ValidationLog
     {
         logType       = type,
         source        = LogSource.Project,
         validatorName = TypeName,
         message       = message,
         objectPath    = string.IsNullOrEmpty(objectPath) ? ObjectTools.GetObjectPath(obj) : objectPath,
         scenePath     = scenePath
     });
 }
예제 #4
0
 protected virtual void RaiseLogCreated(LogEventInfo info) => LogCreated?.Invoke(this, new LogCreatedEventArgs(info));
 protected void DispatchVLogEvent(ValidationLog validationLog)
 {
     LogCreated?.Invoke(validationLog);
 }