After a while, nearly giving up, I stumbled upon this page which showed the correct technique:
c:\windows\system32\inetsrv\appcmd.exe recycle apppool "website.com"
Non-random thoughts.
c:\windows\system32\inetsrv\appcmd.exe recycle apppool "website.com"
Repeat.Any()method on a mocked call to basically make it behave like a stubbed method (if it was called it is ok, but if not that's ok too).
public enum CoffeType
{
Sugar,
NoSugar
}
public enum CoffeType
{
Sugar = 'S',
NoSugar = 'N'
}
public class CoffeTypeType : NHibernate.Type.PersistentEnumType
{
public CoffeTypeType()
: base(typeof(CoffeType))
{
}
public override object GetValue(object code)
{
return Convert.ToChar(code);
}
public override object GetInstance(object code)
{
return (CoffeType) Enum.ToObject(typeof(CoffeType), (Byte) ((Char) GetValue(code)));
}
public override void Set(IDbCommand cmd, object value, int index)
{
IDataParameter par = (IDataParameter)cmd.Parameters[index];
par.DbType = DbType.StringFixedLength;
if (value == null) {
par.Value = DBNull.Value;
}
else {
par.Value = GetValue(value);
}
}
public new static SqlType GetUnderlyingSqlType(System.Type enumClass)
{
if (Enum.GetUnderlyingType(enumClass).FullName == "System.Char") {
return NHibernate.SqlTypes.SqlTypeFactory.GetString(1);
}
else {
return NHibernate.Type.PersistentEnumType.GetUnderlyingSqlType(enumClass);
}
}
}