private void AssertHasIndex() { if (!HasIndex()) { Exceptions4.ThrowRuntimeException(Db4objects.Db4o.Internal.Messages.OnlyForIndexedFields ); } }
private void AssertHasIndex() { if (!HasIndex()) { Exceptions4.ThrowRuntimeException(Messages.OnlyForIndexedFields ); } }
public override void ReadBytes(byte[] bytes, int address, int length) { try { _memoryBin.Read(address, bytes, length); } catch (Exception e) { Exceptions4.ThrowRuntimeException(13, e); } }
public void ReflectWith(IReflector reflect) { if (_container != null) { Exceptions4.ThrowRuntimeException(46); } // see readable message for code in Messages.java if (reflect == null) { throw new ArgumentNullException(); } _config.Put(ConfiguredReflectorKey, reflect); _config.Put(ReflectorKey, null); }
// FIXME: needs test case public virtual void Rename(string newName) { ObjectContainerBase container = Container(); if (!container.IsClient) { _name = newName; _containingClass.SetStateDirty(); _containingClass.Write(container.SystemTransaction()); } else { Exceptions4.ThrowRuntimeException(58); } }
/// <summary>Will raise an exception if argument class doesn't match this class - violates equals() contract in favor of failing fast. /// </summary> /// <remarks>Will raise an exception if argument class doesn't match this class - violates equals() contract in favor of failing fast. /// </remarks> public override bool Equals(object obj) { if (this == obj) { return(true); } if (null == obj) { return(false); } if (GetType() != obj.GetType()) { Exceptions4.ShouldNeverHappen(); } return(GetName().Equals(((Db4objects.Db4o.Internal.Config4Abstract)obj).GetName() )); }
public void TraverseValues(Transaction transaction, IVisitor4 userVisitor) { if (!Alive()) { return; } AssertHasIndex(); ObjectContainerBase stream = transaction.Container(); if (stream.IsClient) { Exceptions4.ThrowRuntimeException(Db4objects.Db4o.Internal.Messages.ClientServerUnsupported ); } lock (stream.Lock()) { IContext context = transaction.Context(); _index.TraverseKeys(transaction, new _IVisitor4_861(this, userVisitor, context)); } }
public virtual int OwnLength() { throw Exceptions4.ShouldNeverBeCalled(); }