コード例 #1
0
        public static CompositeMessageSink NewDefault(IMessageFormatter messageFormatter, IStringlyTypedPathOperator stringlyTypedPathOperator, string messagesOutputFilePath)
        {
            var compositeMessageRepository = new CompositeMessageSink(
                messageFormatter,
                Enumerable.Empty <IMessageSink>(),
                new IFormattedMessageSink[]
            {
                new ConsoleFormattedMessageSink(),
                new FileFormattedMessageSink(stringlyTypedPathOperator, messagesOutputFilePath)
            });

            return(compositeMessageRepository);
        }
コード例 #2
0
        public static CompositeMessageSink NewStandard(IMessageFormatter messageFormatter, InMemoryMessageRepository inMemoryMessageRepository, IStringlyTypedPathOperator stringlyTypedPathOperator, string messagesOutputFilePath)
        {
            var compositeMessageRepository = new CompositeMessageSink(
                messageFormatter,
                new[]
            {
                inMemoryMessageRepository,
            },
                new IFormattedMessageSink[]
            {
                new ConsoleFormattedMessageSink(),
                new FileFormattedMessageSink(stringlyTypedPathOperator, messagesOutputFilePath)
            });

            return(compositeMessageRepository);
        }