Here are the examples of the csharp api System.Collections.Generic.IEnumerable.ToDictionary() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
6 Examples
19
Source : LinqExtensions.cs
with Apache License 2.0
from Capnode
with Apache License 2.0
from Capnode
public static IReadOnlyDictionary<K, V> ToReadOnlyDictionary<K, V>(this IEnumerable<KeyValuePair<K, V>> enumerable)
{
return new ReadOnlyDictionary<K, V>(enumerable.ToDictionary());
}
19
Source : CorporationApplicationExtensions.cs
with MIT License
from PerpetuumOnline
with MIT License
from PerpetuumOnline
public static IDictionary<string, object> ToDictionary(this IEnumerable<CorporationApplication> applications)
{
return applications.ToDictionary("a", a => a.ToDictionary());
}
19
Source : Corporation.cs
with MIT License
from PerpetuumOnline
with MIT License
from PerpetuumOnline
public static IDictionary<string, object> ToDictionary(this IEnumerable<CorporationMember> members)
{
return members.ToDictionary("m", m => m.ToDictionary());
}
19
Source : Corporation.cs
with MIT License
from PerpetuumOnline
with MIT License
from PerpetuumOnline
public IDictionary<string, object> GetMembersWithAnyRoleToDictionary(params CorporationRole[] roles)
{
return GetMembersWithAnyRoles(roles).ToDictionary();
}
19
Source : ProductionInProgress.cs
with MIT License
from PerpetuumOnline
with MIT License
from PerpetuumOnline
public static IDictionary<string, object> ToDictionary(this IEnumerable<ProductionInProgress> productions)
{
return productions.ToDictionary("c", p => p.ToDictionary());
}
19
Source : TeleportRepositoryExtensions.cs
with MIT License
from PerpetuumOnline
with MIT License
from PerpetuumOnline
public static IDictionary<string, object> ToDictionary(this IEnumerable<TeleportDescription> descriptions)
{
return descriptions.ToDictionary("t", td => td.ToDictionary());
}