Skip to content

Conversation

@russcam
Copy link
Contributor

@russcam russcam commented Nov 21, 2016

This removes any ambiguity when enumerating the items in an instance of IIsADictionary<TKey,TValue>.

Any implementation of IIsADictionary<TKey, TValue> must always provide implementations for the contract of IDictionary<TKey, TValue> so there is little value in having the IDictionary contract where boxing and unboxing will be incurred, except to distinguish types that implement IDictionary that are not IIsADictionary.

Removes the cost boxing of values in VerbatimDictionaryKeysConverter by having TKey and TValue generic type parameters.

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

public IIndexField IndexField { get; set; }
/// <inheritdoc/>
public FluentDictionary<string, object> Meta { get; set; }
public IDictionary<string, object> Meta { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooemf we had a fluent dictionary as a property 😢

var properties = new Properties();
var autoProperties = new PropertyWalker(typeof(T), visitor, maxRecursion).GetProperties();
foreach (var autoProperty in (IEnumerable<KeyValuePair<PropertyName, IProperty>>)autoProperties)
foreach (var autoProperty in autoProperties)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

@russcam
Copy link
Contributor Author

russcam commented Nov 22, 2016

ported to 5.x in 4dd1577

@russcam russcam deleted the fix/master-remove-idictionary branch November 24, 2016 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants