This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace IanFNelson.Utilities.Caching | |
{ | |
using System; | |
using System.Web; | |
using System.Web.Caching; | |
public class AspNetCache : ICache | |
{ | |
public object Get(string key) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Castle.Windsor; | |
using Microsoft.Practices.ServiceLocation; | |
/// <summary> | |
/// Adapts the behavior of the Windsor container to the common | |
/// IServiceLocator | |
/// </summary> | |
public class WindsorServiceLocator : ServiceLocatorImplBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Marshalls.Leads.DataAccess | |
{ | |
using System; | |
using System.Collections.Generic; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using Marshalls.Leads.Facilities; | |
using Marshalls.Leads.Facilities.Configuration; | |
using NHibernate; | |
using NHibernate.Cfg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This test is designed to catch those instances where we forget to mark public members on entities | |
/// as virtual - before NH complains at runtime. | |
/// | |
/// Where classes implement properties from interfaces, the CLR will treat those properties | |
/// as virtual even when they have not explicitly been set as such (e.g. implementations of IEntity.Id) | |
/// so this test is not fool-proof. But it should help. | |
/// </summary> | |
[Test] | |
public void Convention_AllDomainEntitiesShouldContainOnlyVirtualMembers() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
/// This method checks whether the control set in the | |
/// ControlToValidate property is valid. | |
/// | |
/// Boolean indicating whether we have a valid ControlToValidate | |
protected override bool ControlPropertiesValid() | |
{ | |
// Get the control we're trying to validate | |
Control ctrl = FindControl(ControlToValidate); | |
if (ctrl == null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Specialized; | |
using System.Reflection; | |
using System.Text; | |
using System.Web.Mail; | |
using Microsoft.ApplicationBlocks.ExceptionManagement; | |
namespace IanFNelson | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Globalization; | |
using System.Reflection; | |
namespace IanNelson.Utilities | |
{ | |
/// <SUMMARY> | |
/// A generic sorter, inheriting from IComparer, | |
/// intended to allow for the sorting of | |
/// strongly-typed collections on any named public property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Text; | |
using System.Globalization; | |
namespace IanNelson.Utilities | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
namespace IanFNelson | |
{ | |
[Serializable()] | |
public class KeyValuePairCollection<TKey, TValue> : | |
Collection<KeyValuePairThatSerializesProperly<TKey, TValue>> | |
{ | |
public void Add(TKey key, TValue value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Search for a collection of customers, given a set of criteria. | |
/// </summary> | |
/// <param name="queryCriteria" />Query Object defining the search criteria.</param> | |
/// <returns>Collection of customers matching the specified criteria.</returns> | |
/// <exception cref="System.ArgumentNullException">Where queryCriteria is null</exception> | |
/// <exception cref="System.ArgumentException">Where no query criteria have been set (we do not permit searching for all customers)</exception> | |
public static CustomerCollection Find(CustomerQuery queryCriteria) | |
{ | |
#region Validate parameters |
OlderNewer