本文整理汇总了C#中Db4objects.Db4o.Internal.ObjectReference类的典型用法代码示例。如果您正苦于以下问题:C# ObjectReference类的具体用法?C# ObjectReference怎么用?C# ObjectReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectReference类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了ObjectReference类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FrozenObjectInfo
private FrozenObjectInfo(ObjectReference @ref, VirtualAttributes virtualAttributes
) : this(@ref == null ? null : @ref.GetObject(), @ref == null ? -1 : @ref.GetID(
), virtualAttributes == null ? null : virtualAttributes.i_database, virtualAttributes
== null ? -1 : virtualAttributes.i_uuid, virtualAttributes == null ? 0 : virtualAttributes
.i_version)
{
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:FrozenObjectInfo.cs
示例2: FrozenObjectInfo
public FrozenObjectInfo(Transaction trans, ObjectReference @ref, bool committed) :
this(@ref, IsInstantiatedReference(@ref)
? @ref.VirtualAttributes(trans, committed
)
: null)
{
}
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:FrozenObjectInfo.cs
示例3: UnmarshallingContext
public UnmarshallingContext(Transaction transaction, ByteArrayBuffer buffer, ObjectReference
@ref, int addToIDTree, bool checkIDTree) : base(transaction, buffer, null, @ref
)
{
_addToIDTree = addToIDTree;
_checkIDTree = checkIDTree;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:UnmarshallingContext.cs
示例4: HashCodeAdd
// do nothing
private void HashCodeAdd(ObjectReference @ref)
{
if (_hashCodeTree == null)
{
_hashCodeTree = @ref;
return;
}
_hashCodeTree = _hashCodeTree.Hc_add(@ref);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:10,代码来源:HashcodeReferenceSystem.cs
示例5: Delete
public override bool Delete(ObjectReference @ref, int id, int cascade)
{
if (!base.Delete(@ref, id, cascade))
{
return false;
}
MsgD msg = Msg.TaDelete.GetWriterForInts(this, new int[] { id, cascade });
_client.WriteBatchedMessage(msg);
return true;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:10,代码来源:ClientTransaction.cs
示例6: CreateReferences
private static object[] CreateReferences()
{
object[] references = new object[Ids.Length];
for (int i = 0; i < Ids.Length; i++)
{
ObjectReference @ref = new ObjectReference(Ids[i]);
@ref.SetObject(Ids[i].ToString());
references[i] = @ref;
}
return references;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:11,代码来源:ReferenceSystemIntegrationTestCase.cs
示例7: RemoveReference
public override void RemoveReference(ObjectReference @ref)
{
if (_newReferences.ReferenceForId(@ref.GetID()) != null)
{
_newReferences.RemoveReference(@ref);
ReferenceCountChanged(-1);
}
if (_committedReferences.ReferenceForId(@ref.GetID()) != null)
{
_committedReferences.RemoveReference(@ref);
ReferenceCountChanged(-1);
}
}
开发者ID:erdincay,项目名称:db4o,代码行数:13,代码来源:MonitoringReferenceSystem.cs
示例8: IdAdd
private void IdAdd(ObjectReference @ref)
{
if (DTrace.enabled)
{
DTrace.IdTreeAdd.Log(@ref.GetID());
}
if (_idTree == null)
{
_idTree = @ref;
return;
}
_idTree = _idTree.Id_add(@ref);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:13,代码来源:HashcodeReferenceSystem.cs
示例9: MarshallingContext
public MarshallingContext(Db4objects.Db4o.Internal.Transaction trans, ObjectReference
@ref, IUpdateDepth updateDepth, bool isNew)
{
// YapClass ID
// Marshaller Version
// number of fields
_transaction = trans;
_reference = @ref;
_nullBitMap = new BitMap4(AspectCount());
_updateDepth = ClassMetadata().AdjustUpdateDepth(trans, updateDepth);
_isNew = isNew;
_writeBuffer = new MarshallingBuffer();
_currentBuffer = _writeBuffer;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:MarshallingContext.cs
示例10: PrefetchObjects
public virtual int PrefetchObjects(ClientObjectContainer container, Transaction trans
, IIntIterator4 ids, object[] prefetched, int prefetchCount)
{
int count = 0;
IList idsToGet = new ArrayList();
while (count < prefetchCount)
{
if (!ids.MoveNext())
{
break;
}
int id = ids.CurrentInt();
if (id > 0)
{
object obj = trans.ObjectForIdFromCache(id);
if (obj != null)
{
prefetched[count] = obj;
}
else
{
idsToGet.Add(Pair.Of(id, count));
}
count++;
}
}
if (idsToGet.Count > 0)
{
ByteArrayBuffer[] buffers = container.ReadObjectSlots(trans, IdArrayFor(idsToGet)
);
for (int i = 0; i < buffers.Length; i++)
{
Pair pair = ((Pair)idsToGet[i]);
int id = (((int)pair.first));
int position = (((int)pair.second));
object obj = trans.ObjectForIdFromCache(id);
if (obj != null)
{
prefetched[position] = obj;
}
else
{
prefetched[position] = new ObjectReference(id).ReadPrefetch(trans, buffers[i], Const4
.AddToIdTree);
}
}
}
return count;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:49,代码来源:SingleMessagePrefetchingStrategy.cs
示例11: Marshall
internal override void Marshall(Transaction trans, ObjectReference @ref, IWriteBuffer
buffer, bool isMigrating, bool isNew)
{
VirtualAttributes attr = @ref.VirtualAttributes();
if (!isMigrating)
{
attr.i_version = trans.Container().GenerateTimeStampId();
}
if (attr == null)
{
buffer.WriteLong(0);
}
else
{
buffer.WriteLong(attr.i_version);
}
}
开发者ID:superyfwy,项目名称:db4o,代码行数:17,代码来源:VersionFieldMetadata.cs
示例12: WriteAndRead
private object WriteAndRead(object obj)
{
var imaginativeID = 500;
var @ref = new ObjectReference(ClassMetadataForObject(obj), imaginativeID
);
@ref.SetObject(obj);
var marshallingContext = new MarshallingContext(Trans(), @ref, Container
().UpdateDepthProvider().ForDepth(int.MaxValue), true);
Handlers4.Write(@ref.ClassMetadata().TypeHandler(), marshallingContext, obj);
var pointer = marshallingContext.AllocateSlot();
var buffer = marshallingContext.ToWriteBuffer(pointer);
buffer.Seek(0);
// String str = new String(buffer._buffer);
// System.out.println(str);
var unmarshallingContext = new UnmarshallingContext(Trans(), @ref
, Const4.AddToIdTree, false);
unmarshallingContext.Buffer(buffer);
unmarshallingContext.ActivationDepth(new LegacyActivationDepth(5));
return unmarshallingContext.Read();
}
开发者ID:masroore,项目名称:db4o,代码行数:20,代码来源:MarshallingContextTestCase.cs
示例13: Delete4
public sealed override bool Delete4(Transaction ta, ObjectReference yo, object obj
, int a_cascade, bool userCall)
{
MsgD msg = Msg.Delete.GetWriterForInts(_transaction, new int[] { yo.GetID(), userCall
? 1 : 0 });
WriteBatchedMessage(msg);
return true;
}
开发者ID:Galigator,项目名称:db4o,代码行数:8,代码来源:ClientObjectContainer.cs
示例14: _IReferenceSource_33
public _IReferenceSource_33(ObjectReference reference)
{
this.reference = reference;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:ReferenceSystemRegistry.cs
示例15: RemoveReference
public virtual void RemoveReference(ObjectReference reference)
{
RemoveReference(new _IReferenceSource_33(reference));
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:ReferenceSystemRegistry.cs
示例16: NewWeakReference
public object NewWeakReference(ObjectReference referent, object obj)
{
return obj;
}
开发者ID:superyfwy,项目名称:db4o,代码行数:4,代码来源:WeakReferenceSupportFactory.cs
示例17: Delete4
public abstract bool Delete4(Transaction ta, ObjectReference @ref, object obj, int
a_cascade, bool userCall);
开发者ID:erdincay,项目名称:db4o,代码行数:2,代码来源:ObjectContainerBase.cs
示例18: CreateRef
private ObjectReference CreateRef(int id, ReferenceSystemTestCaseBase.Data data)
{
ObjectReference @ref = new ObjectReference(id);
@ref.SetObject(data);
return @ref;
}
开发者ID:Galigator,项目名称:db4o,代码行数:6,代码来源:ReferenceSystemTestCaseBase.cs
示例19: AddExistingReference
public override void AddExistingReference(ObjectReference @ref)
{
_committedReferences.AddExistingReference(@ref);
ReferenceCountChanged(1);
}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:MonitoringReferenceSystem.cs
示例20: Marshall
internal abstract void Marshall(Transaction trans, ObjectReference @ref, IWriteBuffer
buffer, bool migrating, bool isNew);
开发者ID:erdincay,项目名称:db4o,代码行数:2,代码来源:VirtualFieldMetadata.cs
注:本文中的Db4objects.Db4o.Internal.ObjectReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论