public string GetFileFilterString(FormatterDirection Direction)
        {
            IEnumerable<KeyValuePair<string, ITrackFormatter>> formatters =
                _formatters.Where(f => (f.Value.Direction & Direction) == Direction)
                           .ToList();

            return String.Format("All supported|{0}|",
                                 string.Join(";", formatters.Select(k => String.Format("*.{0}", k.Key))))
                   +
                   string.Join("|", formatters.Select(f => string.Format("{0}|*.{1}", f.Value.Name, f.Value.Extension)));
        }
        public WebDispatchFormatter(
            WebFormatterFactory formatterFactory,
            OperationDescription operationDescription,
            IDispatchMessageFormatter originalFormatter,
            FormatterDirection direction)
        {
            _formatterFactory = formatterFactory;
            _requestParameters = operationDescription.GetRequestMessageParts();
            _responseType = operationDescription.GetResponseType();
            _direction = direction;

            if (direction != FormatterDirection.Both)
                _originalFormatter = originalFormatter;
        }
Esempio n. 3
0
        public WebDispatchFormatter(
            WebFormatterFactory formatterFactory,
            OperationDescription operationDescription,
            IDispatchMessageFormatter originalFormatter,
            FormatterDirection direction)
        {
            _formatterFactory  = formatterFactory;
            _requestParameters = operationDescription.GetRequestMessageParts();
            _responseType      = operationDescription.GetResponseType();
            _direction         = direction;

            if (direction != FormatterDirection.Both)
            {
                _originalFormatter = originalFormatter;
            }
        }