예제 #1
0
 public static int GetRomDoubleWordUnsafe(this IReadOnlyByteSource data, int offset)
 {
     // ReSharper disable once PossibleInvalidOperationException
     return((int)data.GetRomDoubleWord(offset));
 }
예제 #2
0
        // older interface never had to worry about null. new interface now we do.
        // these are unsafe helper methods for code not yet using the new interface.
        // new code shouldn't use these if possible, and older code should migrate to checking for null directly.

        public static byte GetRomByteUnsafe(this IReadOnlyByteSource data, int offset)
        {
            // ReSharper disable once PossibleInvalidOperationException
            return((byte)data.GetRomByte(offset));
        }