本文整理汇总了C#中Db4objects.Db4o.Internal.Transaction类的典型用法代码示例。如果您正苦于以下问题:C# Transaction类的具体用法?C# Transaction怎么用?C# Transaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Transaction类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了Transaction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetWriterForByte
public MsgD GetWriterForByte(Transaction trans
, byte b)
{
var msg = GetWriterForLength(trans, 1);
msg._payLoad.WriteByte(b);
return msg;
}
示例2: FrozenObjectInfo
public FrozenObjectInfo(Transaction trans, ObjectReference @ref, bool committed) :
this(@ref, IsInstantiatedReference(@ref)
? @ref.VirtualAttributes(trans, committed
)
: null)
{
}
示例3: Rename
protected virtual void Rename(Transaction transaction, string from, string to)
{
var item = Query(transaction, from);
Assert.IsNotNull(item);
item.name = to;
Container().Store(transaction, item);
}
示例4: Remove
protected virtual void Remove(Transaction transaction, int[] keys)
{
for (var i = 0; i < keys.Length; i++)
{
Remove(transaction, keys[i]);
}
}
示例5: TraverseAll
public override void TraverseAll(Transaction ta, IVisitor4 command)
{
if (_btreeIndex != null)
{
_btreeIndex.TraverseKeys(ta, command);
}
}
示例6: ReadTypeInfo
public virtual void ReadTypeInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
info, int classID)
{
BitMap4 typeInfoBitmap = new BitMap4(buffer.ReadByte());
info.Primitive(typeInfoBitmap.IsTrue(0));
info.Nullable(typeInfoBitmap.IsTrue(1));
}
示例7: Add
protected virtual void Add(Transaction transaction, int[] keys)
{
for (int i = 0; i < keys.Length; i++)
{
Add(transaction, keys[i]);
}
}
示例8: Dispatch
public virtual bool Dispatch(Transaction trans, object obj, int eventID)
{
if (methods[eventID] == null)
{
return true;
}
object[] parameters = new object[] { trans.ObjectContainer() };
ObjectContainerBase container = trans.Container();
int stackDepth = container.StackDepth();
int topLevelCallId = container.TopLevelCallId();
container.StackDepth(0);
try
{
object res = methods[eventID].Invoke(obj, parameters);
if (res is bool)
{
return ((bool)res);
}
}
finally
{
container.StackDepth(stackDepth);
container.TopLevelCallId(topLevelCallId);
}
return true;
}
示例9: Release
public virtual void Release(ShutdownMode mode, Transaction transaction, bool rollbackOnClose
)
{
lock (_mainContainer.Lock())
{
ClientTransactionPool.ContainerCount entry = (ClientTransactionPool.ContainerCount
)_transaction2Container.Get(transaction);
entry.Container().CloseTransaction(transaction, false, mode.IsFatal() ? false : rollbackOnClose
);
_transaction2Container.Remove(transaction);
entry.Release();
if (entry.IsEmpty())
{
_fileName2Container.Remove(entry.FileName());
try
{
entry.Close(mode);
}
catch (Exception t)
{
// If we are in fatal ShutdownMode close will
// throw but we want to continue shutting down
// all entries.
Sharpen.Runtime.PrintStackTrace(t);
}
}
}
}
示例10: CreateDefault
public virtual object CreateDefault(Transaction a_trans)
{
BlobImpl bi = null;
bi = (BlobImpl)this.MemberwiseClone();
bi.SetTrans(a_trans);
return bi;
}
示例11: GetOrCreate
public override object GetOrCreate(Transaction a_trans, object a_OnObject)
{
// This is the first part of marshalling
// Virtual fields do it all in #marshall(), the object is never used.
// Returning any object here prevents triggering null handling.
return AnyObject;
}
示例12: EnsureSingleOccurence
private void EnsureSingleOccurence(Transaction trans, IObjectInfoCollection col)
{
IEnumerator i = col.GetEnumerator();
while (i.MoveNext())
{
IObjectInfo objectInfo = (IObjectInfo)i.Current;
if (this.ReflectClass() != this._enclosing.ReflectorFor(trans, objectInfo.GetObject
()))
{
continue;
}
object obj = this.ObjectFor(trans, objectInfo);
object fieldValue = this.FieldMetadata().GetOn(trans, obj);
if (fieldValue == null)
{
continue;
}
IBTreeRange range = this.FieldMetadata().Search(trans, fieldValue);
if (range.Size() > 1)
{
throw new UniqueFieldValueConstraintViolationException(this.ClassMetadata().GetName
(), this.FieldMetadata().GetName());
}
}
}
示例13: QConClass
internal QConClass(Transaction trans, QCon parent, QField field, IReflectClass claxx
) : base(trans, parent, field, null)
{
// C/S
if (claxx != null)
{
ObjectContainerBase container = trans.Container();
_classMetadata = container.ClassMetadataForReflectClass(claxx);
if (_classMetadata == null)
{
// could be an aliased class, try to resolve.
string className = claxx.GetName();
string aliasRunTimeName = container.Config().ResolveAliasStoredName(className);
if (!className.Equals(aliasRunTimeName))
{
_classMetadata = container.ClassMetadataForName(aliasRunTimeName);
}
}
if (claxx.Equals(container._handlers.IclassObject))
{
_classMetadata = (ClassMetadata)_classMetadata.TypeHandler();
}
}
_claxx = claxx;
}
示例14: UnmarshallingContext
public UnmarshallingContext(Transaction transaction, ByteArrayBuffer buffer, ObjectReference
@ref, int addToIDTree, bool checkIDTree) : base(transaction, buffer, null, @ref
)
{
_addToIDTree = addToIDTree;
_checkIDTree = checkIDTree;
}
示例15: LazyClientQueryResult
public LazyClientQueryResult(Transaction trans, ClientObjectContainer client, int
queryResultID) : base(trans)
{
_client = client;
_queryResultID = queryResultID;
_iterator = new LazyClientIdIterator(this);
}