public DateTime? GetValueAsDateTime()
{
if (this._disposed)
throw new ObjectDisposedException(this.GetType().FullName);
DateTime? value = null;
CkaUtils.ConvertValue(ref _ckAttribute, out value);
return value;
}
public void _07_DateTimeAttributeTest() { if (Platform.UnmanagedLongSize != 8 || Platform.StructPackingSize != 1) Assert.Inconclusive("Test cannot be executed on this platform"); DateTime value = new DateTime(2012, 1, 30, 0, 0, 0, DateTimeKind.Utc); // Create attribute with DateTime value using (ObjectAttribute attr = new ObjectAttribute(CKA.CKA_START_DATE, value)) { Assert.IsTrue(attr.Type == (ulong)CKA.CKA_START_DATE); Assert.IsTrue(attr.GetValueAsDateTime() == value); } }