Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit 077a813

Browse files
committed
Fixed bug in CustomStore.GetKeys enumeration.
This bug only existed in the OpenIdProviderWebForms sample. The OpenIdRelyingPartyWebForms sample's copy of this file already had the fix in it.
1 parent 6d77e84 commit 077a813

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

samples/OpenIdProviderWebForms/Code/CustomStore.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace OpenIdProviderWebForms.Code {
99
using System.Collections.Generic;
1010
using System.Data;
1111
using System.Globalization;
12+
using System.Linq;
1213
using DotNetOpenAuth;
1314
using DotNetOpenAuth.Configuration;
1415
using DotNetOpenAuth.Messaging.Bindings;
@@ -100,7 +101,7 @@ public IEnumerable<KeyValuePair<string, CryptoKey>> GetKeys(string bucket) {
100101
yield break;
101102
}
102103

103-
foreach (CustomStoreDataSet.CryptoKeyRow row in view) {
104+
foreach (CustomStoreDataSet.CryptoKeyRow row in view.Cast<DataRowView>().Select(rv => rv.Row)) {
104105
yield return new KeyValuePair<string, CryptoKey>(row.Handle, new CryptoKey(row.Secret, row.ExpiresUtc));
105106
}
106107
}

0 commit comments

Comments
 (0)