public void Address(object sender, Tryte address) { int addr = address.ToInt(); if (addr < 0) { throw new IndexOutOfRangeException(); } else if (addr < TRIBBLE_SIZE) { trortRegister = null; tryteRegister.ReadWriteEnabled(this, Trit.Neu); tryteRegister = _TryteRegisters[addr]; tryteRegister.ReadWriteEnabled(this, rwEnabledState); } else if (addr < TRIBBLE_SIZE * 2) { tryteRegister = null; trortRegister.ReadWriteEnabled(this, Trit.Neu); trortRegister = _TrortRegisters[addr]; trortRegister.ReadWriteEnabled(this, rwEnabledState); } }
public TernaryString Substring(Tryte index, Tryte length) { int len = length.ToInt(); return(new TernaryString(_Chars.Skip(index.ToInt()).Take(len))); }
public TernaryString Substring(Tryte index) { return(new TernaryString(_Chars.Skip(index.ToInt()))); }