Audit.DomainAwareAnalysis.GetCategoryNames C# (CSharp) Метод

GetCategoryNames() публичный статический Метод

public static GetCategoryNames ( Lokad.Cqrs.ImmutableMessage messages ) : string
messages Lokad.Cqrs.ImmutableMessage
Результат string
        public static string GetCategoryNames(ImmutableMessage messages)
        {
            var item = messages.Content;

            if (item is IFunctionalCommand || item is IFunctionalEvent)
                return "system";

            var @event = item as IEvent<IIdentity>;

            if (@event != null)
            {
                return @event.Id.ToString();
            }

            var command = item as ICommand<IIdentity>;

            if (command != null)
            {
                return command.Id.ToString();
            }

            throw new InvalidOperationException("Unknown envelope category name.");
        }