Endjin.Assembly.ChangeDetection.Infrastructure.Tracer.Execute C# (CSharp) 메소드

Execute() 공개 정적인 메소드

Executes the callback when the given trace level is enabled. That allows when tracing is enabled complex string formatting only when needed.
public static Execute ( MessageTypes msgType, Level level, TypeHashes type, System.Action action ) : bool
msgType MessageTypes The message type which must match.
level Level The trace level which must match.
type TypeHashes TypeHandle of your class.
action System.Action The delegate to execute when it does match.
리턴 bool
        public static bool Execute(MessageTypes msgType, Level level, TypeHashes type, Action action)
        {
            if (TracerConfig.Instance.IsEnabled(type, msgType, level))
            {
                action();
                return true;
            }
            return false;
        }