public void NullSafeSet(DbCommand cmd, object value, int index, bool[] settable, ISessionImplementor session) { DoubleString ds = value as DoubleString ?? new DoubleString(); NHibernateUtil.String.NullSafeSet(cmd, ds.s1, index, session); NHibernateUtil.String.NullSafeSet(cmd, ds.s2, index + 1, session); }
public void NullSafeSet(IDbCommand st, Object value, int index, bool[] unknown, ISessionImplementor session) { DoubleString ds = value as DoubleString ?? new DoubleString(); NHibernateUtil.String.NullSafeSet(st, ds.s1, index, session); NHibernateUtil.String.NullSafeSet(st, ds.s2, index + 1, session); }
public int GetHashCode(object x) { unchecked { DoubleString a = (DoubleString)x; return(a.s1.GetHashCode() + 31 * a.s2.GetHashCode()); } }
public Object DeepCopy(Object x) { if (x == null) return null; DoubleString result = new DoubleString(); DoubleString input = (DoubleString)x; result.s1 = input.s1; result.s2 = input.s2; return result; }
public new bool Equals(object x, object y) { if (x == y) return true; if (x == null || y == null) return false; DoubleString lhs = (DoubleString)x; DoubleString rhs = (DoubleString)y; return lhs.s1 == rhs.s1 && lhs.s2 == rhs.s2; }
private void LoadPlaces() { var customPlaces = new DoubleString[mainC.Settings.CustomPaths.Count]; for (var i = 0; i < mainC.Settings.CustomPaths.Count; i++) { customPlaces[i] = new DoubleString(mainC.Settings.CustomPaths[i], StringHandler.GetFilename(mainC.Settings.CustomPaths[i])); } ListPlaces.LoadPlaces(customPlaces); }
public Object DeepCopy(Object x) { if (x == null) { return(null); } DoubleString result = new DoubleString(); DoubleString input = (DoubleString)x; result.s1 = input.s1; result.s2 = input.s2; return(result); }
public new bool Equals(object x, object y) { if (x == y) { return(true); } if (x == null || y == null) { return(false); } DoubleString lhs = (DoubleString)x; DoubleString rhs = (DoubleString)y; return(lhs.s1 == rhs.s1 && lhs.s2 == rhs.s2); }
private void UpdateList() { try { int i, j; UInt32[] address; UInt32 peekAddress, actAddress, peekValue; WatchDataSize dataSize; UInt32 dumpAnd; String aOutput, vOutput; UInt32 add; bool pointer, vPointer, vAddress; int maxCount = Math.Min(addressWatchList.Count, watchOut.RowCount); DoubleString[] oUp = new DoubleString[maxCount]; for (i = 0; i < maxCount; i++) { // Skip over any rows that aren't displayed if (!isRowDisplayed(watchOut, i)) { continue; } address = addressWatchList[i].address; pointer = address.Length > 1; dataSize = addressWatchList[i].dataSize; switch (dataSize) { case WatchDataSize.Bit8: dumpAnd = 0xFFFFFFFF; break; case WatchDataSize.Bit16: dumpAnd = 0xFFFFFFFE; break; default: dumpAnd = 0xFFFFFFFC; break; } vPointer = true; peekAddress = address[0]; for (j = 1; j < address.Length; j++) { if (ValidMemory.validAddress(peekAddress, enableDebug)) { peekAddress &= 0xFFFFFFFC; peekAddress = gecko.peek(peekAddress); peekAddress += address[j]; } else { vPointer = false; break; } } vAddress = vPointer && ValidMemory.validAddress(peekAddress, enableDebug); if (pointer) { aOutput = "P->"; if (vPointer) { aOutput += GlobalFunctions.toHex(peekAddress); } else { aOutput += "????????"; } } else { aOutput = GlobalFunctions.toHex(peekAddress); } if (vAddress) { actAddress = peekAddress; peekAddress &= 0xFFFFFFFC; add = actAddress - peekAddress; add &= dumpAnd; peekValue = gecko.peek(peekAddress); vOutput = ParseValue(peekValue, dataSize, add, addressWatchList[i]); addressWatchList[i].addressAvail = true; addressWatchList[i].updatedAddress = peekAddress + add; } else { vOutput = "????????"; addressWatchList[i].addressAvail = false; } oUp[i].address = aOutput; oUp[i].value = vOutput; watchOut.Invoke((MethodInvoker) delegate { watchOut.Rows[i].Cells[1].Value = oUp[i].address; watchOut.Rows[i].Cells[3].Value = oUp[i].value; }); } //watchOut.Invoke((MethodInvoker)delegate // { // for (i = 0; i < maxCount; i++) // { // watchOut.Rows[i].Cells[1].Value = oUp[i].address; // watchOut.Rows[i].Cells[3].Value = oUp[i].value; // } // }); } catch (EUSBGeckoException e) { listEnabled = false; exceptionHandling.HandleException(e); } catch { } }
private void UpdateList() { try { int i, j; UInt32[] address; UInt32 peekAddress, actAddress, peekValue; WatchDataSize dataSize; UInt32 dumpAnd; String aOutput, vOutput; UInt32 add; bool pointer, vPointer, vAddress; int maxCount = Math.Min(addressWatchList.Count, watchOut.RowCount); DoubleString[] oUp = new DoubleString[maxCount]; for (i = 0; i < maxCount; i++) { // Skip over any rows that aren't displayed if (!isRowDisplayed(watchOut, i)) { continue; } address = addressWatchList[i].address; pointer = address.Length > 1; dataSize = addressWatchList[i].dataSize; switch (dataSize) { case WatchDataSize.Bit8: dumpAnd = 0xFFFFFFFF; break; case WatchDataSize.Bit16: dumpAnd = 0xFFFFFFFE; break; default: dumpAnd = 0xFFFFFFFC; break; } vPointer = true; peekAddress = address[0]; for (j = 1; j < address.Length; j++) { if (ValidMemory.validAddress(peekAddress, enableDebug)) { peekAddress &= 0xFFFFFFFC; peekAddress = gecko.peek(peekAddress); peekAddress += address[j]; } else { vPointer = false; break; } } vAddress = vPointer && ValidMemory.validAddress(peekAddress, enableDebug); if (pointer) { aOutput = "P->"; if (vPointer) aOutput += GlobalFunctions.toHex(peekAddress); else aOutput += "????????"; } else { aOutput = GlobalFunctions.toHex(peekAddress); } if (vAddress) { actAddress = peekAddress; peekAddress &= 0xFFFFFFFC; add = actAddress - peekAddress; add &= dumpAnd; peekValue = gecko.peek(peekAddress); vOutput = ParseValue(peekValue, dataSize, add, addressWatchList[i]); addressWatchList[i].addressAvail = true; addressWatchList[i].updatedAddress = peekAddress + add; } else { vOutput = "????????"; addressWatchList[i].addressAvail = false; } oUp[i].address = aOutput; oUp[i].value = vOutput; watchOut.Invoke((MethodInvoker)delegate { watchOut.Rows[i].Cells[1].Value = oUp[i].address; watchOut.Rows[i].Cells[3].Value = oUp[i].value; }); } //watchOut.Invoke((MethodInvoker)delegate // { // for (i = 0; i < maxCount; i++) // { // watchOut.Rows[i].Cells[1].Value = oUp[i].address; // watchOut.Rows[i].Cells[3].Value = oUp[i].value; // } // }); } catch (EUSBGeckoException e) { listEnabled = false; exceptionHandling.HandleException(e); } catch { } }
internal Method GetMethod(DoubleString str) { return(x => FObject.NewString(str.Invoke(x[0].IsString(), x[1].IsString()))); }
public DoubleStringEnumerator(DoubleString doubleStringObjt) { _elemList = doubleStringObjt; _index = -1; }
protected bool Equals(DoubleString other) { return(string.Equals(Value, other.Value) && string.Equals(DisplayName, other.DisplayName)); }