public static void Address( ByteSegment memory, ref string address_cache, out ByteSegment segment, out ROM_Address address, out string address_string) { if (null == (object)address_cache) { var address_for_string = memory.ROM_Address(); address = address_for_string; System.Threading.Interlocked.CompareExchange(ref address_cache, address.ToString(), null); #if DEBUG //why not make sure the parser works.. if (address != ROM_Address.Parse(address_cache)) { throw new InvalidProgramException("critical failure"); } #endif } else { address = memory.ROM_Address(); } segment = memory; address_string = address_cache; }
void IMemoryProperty.Address(out ByteSegment segment, out ROM_Address address, out string address_string) { IMemoryPropertyUtility.Address(memory, ref mem_adr, out segment, out address, out address_string); }