Skip to content

Commit

Permalink
CCbug or other bug:
Browse files Browse the repository at this point in the history
For some odd reason, having this next class causes our test project to fail to build with this error:
Error	42	Method 'StoreAssociation' in type 'DotNetOpenAuth.OpenId.IAssociationStoreContract_Accessor`1' from assembly 'DotNetOpenAuth_Accessor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.	DotNetOpenAuth.Test
  • Loading branch information
AArnott committed Jul 3, 2009
1 parent 733fd20 commit 129b8e9
Showing 1 changed file with 86 additions and 86 deletions.
172 changes: 86 additions & 86 deletions src/DotNetOpenAuth/OpenId/IAssociationStore.cs
Expand Up @@ -99,96 +99,96 @@ public interface IAssociationStore<TKey> {

// For some odd reason, having this next class causes our test project to fail to build with this error:
// Error 42 Method 'StoreAssociation' in type 'DotNetOpenAuth.OpenId.IAssociationStoreContract_Accessor`1' from assembly 'DotNetOpenAuth_Accessor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. DotNetOpenAuth.Test
/////// <summary>
/////// Code Contract for the <see cref="IAssociationStore&lt;TKey&gt;"/> class.
/////// </summary>
/////// <typeparam name="TKey">The type of the key.</typeparam>
////[ContractClassFor(typeof(IAssociationStore<>))]
////internal abstract class IAssociationStoreContract<TKey> : IAssociationStore<TKey> {
//// #region IAssociationStore<TKey> Members
/// <summary>
/// Code Contract for the <see cref="IAssociationStore&lt;TKey&gt;"/> class.
/// </summary>
/// <typeparam name="TKey">The type of the key.</typeparam>
[ContractClassFor(typeof(IAssociationStore<>))]
internal abstract class IAssociationStoreContract<TKey> : IAssociationStore<TKey> {
#region IAssociationStore<TKey> Members

//// /// <summary>
//// /// Saves an <see cref="Association"/> for later recall.
//// /// </summary>
//// /// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for providers).</param>
//// /// <param name="association">The association to store.</param>
//// /// <remarks>
//// /// TODO: what should implementations do on association handle conflict?
//// /// </remarks>
//// void IAssociationStore<TKey>.StoreAssociation(TKey distinguishingFactor, Association association) {
//// Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
//// Contract.Requires<ArgumentNullException>(association != null);
//// throw new NotImplementedException();
//// }
/// <summary>
/// Saves an <see cref="Association"/> for later recall.
/// </summary>
/// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for providers).</param>
/// <param name="association">The association to store.</param>
/// <remarks>
/// TODO: what should implementations do on association handle conflict?
/// </remarks>
void IAssociationStore<TKey>.StoreAssociation(TKey distinguishingFactor, Association association) {
Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
Contract.Requires<ArgumentNullException>(association != null);
throw new NotImplementedException();
}

//// /// <summary>
//// /// Gets the best association (the one with the longest remaining life) for a given key.
//// /// </summary>
//// /// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
//// /// <param name="securityRequirements">The security requirements that the returned association must meet.</param>
//// /// <returns>
//// /// The requested association, or null if no unexpired <see cref="Association"/>s exist for the given key.
//// /// </returns>
//// /// <remarks>
//// /// In the event that multiple associations exist for the given
//// /// <paramref name="distinguishingFactor"/>, it is important for the
//// /// implementation for this method to use the <paramref name="securityRequirements"/>
//// /// to pick the best (highest grade or longest living as the host's policy may dictate)
//// /// association that fits the security requirements.
//// /// Associations that are returned that do not meet the security requirements will be
//// /// ignored and a new association created.
//// /// </remarks>
//// Association IAssociationStore<TKey>.GetAssociation(TKey distinguishingFactor, SecuritySettings securityRequirements) {
//// Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
//// Contract.Requires<ArgumentNullException>(securityRequirements != null);
//// throw new NotImplementedException();
//// }
/// <summary>
/// Gets the best association (the one with the longest remaining life) for a given key.
/// </summary>
/// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
/// <param name="securityRequirements">The security requirements that the returned association must meet.</param>
/// <returns>
/// The requested association, or null if no unexpired <see cref="Association"/>s exist for the given key.
/// </returns>
/// <remarks>
/// In the event that multiple associations exist for the given
/// <paramref name="distinguishingFactor"/>, it is important for the
/// implementation for this method to use the <paramref name="securityRequirements"/>
/// to pick the best (highest grade or longest living as the host's policy may dictate)
/// association that fits the security requirements.
/// Associations that are returned that do not meet the security requirements will be
/// ignored and a new association created.
/// </remarks>
Association IAssociationStore<TKey>.GetAssociation(TKey distinguishingFactor, SecuritySettings securityRequirements) {
Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
Contract.Requires<ArgumentNullException>(securityRequirements != null);
throw new NotImplementedException();
}

//// /// <summary>
//// /// Gets the association for a given key and handle.
//// /// </summary>
//// /// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
//// /// <param name="handle">The handle of the specific association that must be recalled.</param>
//// /// <returns>
//// /// The requested association, or null if no unexpired <see cref="Association"/>s exist for the given key and handle.
//// /// </returns>
//// Association IAssociationStore<TKey>.GetAssociation(TKey distinguishingFactor, string handle) {
//// Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
//// Contract.Requires(!String.IsNullOrEmpty(handle));
//// throw new NotImplementedException();
//// }
/// <summary>
/// Gets the association for a given key and handle.
/// </summary>
/// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
/// <param name="handle">The handle of the specific association that must be recalled.</param>
/// <returns>
/// The requested association, or null if no unexpired <see cref="Association"/>s exist for the given key and handle.
/// </returns>
Association IAssociationStore<TKey>.GetAssociation(TKey distinguishingFactor, string handle) {
Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
Contract.Requires(!String.IsNullOrEmpty(handle));
throw new NotImplementedException();
}

//// /// <summary>
//// /// Removes a specified handle that may exist in the store.
//// /// </summary>
//// /// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
//// /// <param name="handle">The handle of the specific association that must be deleted.</param>
//// /// <returns>
//// /// True if the association existed in this store previous to this call.
//// /// </returns>
//// /// <remarks>
//// /// No exception should be thrown if the association does not exist in the store
//// /// before this call.
//// /// </remarks>
//// bool IAssociationStore<TKey>.RemoveAssociation(TKey distinguishingFactor, string handle) {
//// Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
//// Contract.Requires(!String.IsNullOrEmpty(handle));
//// throw new NotImplementedException();
//// }
/// <summary>
/// Removes a specified handle that may exist in the store.
/// </summary>
/// <param name="distinguishingFactor">The Uri (for relying parties) or Smart/Dumb (for Providers).</param>
/// <param name="handle">The handle of the specific association that must be deleted.</param>
/// <returns>
/// True if the association existed in this store previous to this call.
/// </returns>
/// <remarks>
/// No exception should be thrown if the association does not exist in the store
/// before this call.
/// </remarks>
bool IAssociationStore<TKey>.RemoveAssociation(TKey distinguishingFactor, string handle) {
Contract.Requires<ArgumentNullException>(distinguishingFactor != null);
Contract.Requires(!String.IsNullOrEmpty(handle));
throw new NotImplementedException();
}

//// /// <summary>
//// /// Clears all expired associations from the store.
//// /// </summary>
//// /// <remarks>
//// /// If another algorithm is in place to periodically clear out expired associations,
//// /// this method call may be ignored.
//// /// This should be done frequently enough to avoid a memory leak, but sparingly enough
//// /// to not be a performance drain.
//// /// </remarks>
//// void IAssociationStore<TKey>.ClearExpiredAssociations() {
//// throw new NotImplementedException();
//// }
/// <summary>
/// Clears all expired associations from the store.
/// </summary>
/// <remarks>
/// If another algorithm is in place to periodically clear out expired associations,
/// this method call may be ignored.
/// This should be done frequently enough to avoid a memory leak, but sparingly enough
/// to not be a performance drain.
/// </remarks>
void IAssociationStore<TKey>.ClearExpiredAssociations() {
throw new NotImplementedException();
}

//// #endregion
////}
#endregion
}
}

0 comments on commit 129b8e9

Please sign in to comment.