public CsvOutputFormatter(ITableOrganizer defaultTableOrganizer) { SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/csv")); SupportedEncodings.Add(Encoding.UTF8); SupportedEncodings.Add(Encoding.Unicode); _tableOrganizer = defaultTableOrganizer; }
private ITableOrganizer FindMatchTableOrganizer(Type type) { ITableOrganizer selectedOrganizer = null; foreach (var organizer in _tableOrganizers) { if (organizer.Key.IsAssignableFrom(type)) { selectedOrganizer = organizer.Value; break; } } if (selectedOrganizer == null) { selectedOrganizer = _defaultTableOrganizer; } return(selectedOrganizer); }
public void AddOrganizer(Type mappedType, ITableOrganizer tableOrganizer) { _tableOrganizers.Enqueue(new KeyValuePair <Type, ITableOrganizer>(mappedType, tableOrganizer)); }
public TableOrganizerNavigator(ITableOrganizer defaultTableOrganizer) { _defaultTableOrganizer = defaultTableOrganizer; _tableOrganizers = new Queue <KeyValuePair <Type, ITableOrganizer> >(); }
public EnumerableTableOrganizer(ITableOrganizer itemOrganizer) { _itemOrganizer = itemOrganizer; }