Permalink
Browse files

normalized the interface for when working with FluentColumnFamily as …

…a non-dynamic type
  • Loading branch information...
1 parent 2936143 commit fa770e089b5f75cf2797811da8f6ebcfcee0e697 @nberardi nberardi committed Jul 23, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/FluentColumnFamily.cs
View
@@ -82,12 +82,15 @@ public CassandraObject Key
{
get
{
- var value = GetColumnValue(columnName);
-
- if (value is NullType)
+ object value;
+ if (!TryGetColumn(columnName, out value))
throw new CassandraException(String.Format("Column, {0}, could not be found.", columnName));
- return value;
+ return (CassandraObject)value;
+ }
+ set
+ {
+ TrySetColumn(columnName, value);
}
}
@@ -209,7 +212,7 @@ public override bool TryGetColumn(object name, out object result)
{
result = GetColumnValue(name);
- return true;
+ return !(result is NullType);
}
/// <summary>

0 comments on commit fa770e0

Please sign in to comment.