本文整理汇总了C#中SessionBase.GlobalObjWrapperGet方法的典型用法代码示例。如果您正苦于以下问题:C# SessionBase.GlobalObjWrapperGet方法的具体用法?C# SessionBase.GlobalObjWrapperGet怎么用?C# SessionBase.GlobalObjWrapperGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionBase
的用法示例。
在下文中一共展示了SessionBase.GlobalObjWrapperGet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectViewModel
public ObjectViewModel(object obj, FieldViewModel parentView, int arrayIndex, bool encodedOid, SessionBase session)
: base(parentView, true)
{
m_session = session;
if (encodedOid)
{
if (obj.GetType() == typeof(UInt64))
{
m_objectId = (UInt64)obj;
m_objectAsString = "[" + arrayIndex.ToString() + "] " + new Oid(m_objectId).ToString();
}
else
{
Oid oid = new Oid(parentView.ParentId);
oid = new Oid(oid.Database, (UInt32)obj);
m_objectId = oid.Id;
m_objectAsString = "[" + arrayIndex.ToString() + "] " + new OidShort(oid.IdShort).ToString();
}
}
else
{
IOptimizedPersistable pObj = obj as IOptimizedPersistable;
if (pObj == null)
session.GlobalObjWrapperGet(obj, out pObj);
if (pObj != null)
m_objectId = pObj.Id;
m_session = session;
if (pObj != null && pObj.WrappedObject != obj)
m_objectAsString = "[" + arrayIndex.ToString() + "] " + pObj.WrappedObject.ToString() + " " + new Oid(pObj.Id);
else
m_objectAsString = "[" + arrayIndex.ToString() + "] " + obj.ToString();
}
}