Exemplo n.º 1
0
        public Library.Document[] GetDocuments(System.String format)
        {
            var preInvocationLoggingData =
                new LoggingData[]
            {
                new LoggingData {
                    Name = "Method", Value = "Get Documents"
                },
                new LoggingData {
                    Name = "Document Format", Value = format
                },
            }
            .Concat(constantLoggingData)
            .ToArray();

            Library.Document[] returnValue;

            try
            {
                returnValue = decorated.GetDocuments(format);
            }
            catch (Exception ex)
            {
                logger.LogError(preInvocationLoggingData, ex);
                throw;
            }

            var returnValueLoggingData = new LoggingData[]
            {
                new LoggingData {
                    Name = "Return Value", Value = returnValue.Length.ToString()
                },
            };

            logger.LogSuccess(preInvocationLoggingData.Concat(returnValueLoggingData).ToArray());

            return(returnValue);
        }