本文整理汇总了C#中dnlib.DotNet.MD.ColumnInfo.Read方法的典型用法代码示例。如果您正苦于以下问题:C# ColumnInfo.Read方法的具体用法?C# ColumnInfo.Read怎么用?C# ColumnInfo.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dnlib.DotNet.MD.ColumnInfo
的用法示例。
在下文中一共展示了ColumnInfo.Read方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadColumn_NoLock
/// <summary>
/// Reads a column
/// </summary>
/// <param name="table">The table</param>
/// <param name="rid">Row ID</param>
/// <param name="column">Column</param>
/// <param name="value">Result is put here or 0 if we return <c>false</c></param>
/// <returns><c>true</c> if we could read the column, <c>false</c> otherwise</returns>
internal bool ReadColumn_NoLock(MDTable table, uint rid, ColumnInfo column, out uint value) {
if (table.IsInvalidRID(rid)) {
value = 0;
return false;
}
var cr = columnReader;
if (cr != null && cr.ReadColumn(table, rid, column, out value))
return true;
var reader = GetReader_NoLock(table, rid);
reader.Position += column.Offset;
value = column.Read(reader);
return true;
}
示例2: ReadColumn
/// <summary>
/// Reads a column
/// </summary>
/// <param name="table">The table</param>
/// <param name="rid">Row ID</param>
/// <param name="column">Column</param>
/// <param name="value">Result is put here or 0 if we return <c>false</c></param>
/// <returns><c>true</c> if we could read the column, <c>false</c> otherwise</returns>
public bool ReadColumn(MDTable table, uint rid, ColumnInfo column, out uint value) {
if (table.IsInvalidRID(rid)) {
value = 0;
return false;
}
var cr = columnReader;
if (cr != null && cr.ReadColumn(table, rid, column, out value))
return true;
#if THREAD_SAFE
theLock.EnterWriteLock(); try {
#endif
var reader = GetReader_NoLock(table, rid);
reader.Position += column.Offset;
value = column.Read(reader);
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
#endif
return true;
}