当前位置: 首页>>代码示例>>C#>>正文


C# SessionBase.OpenSchema方法代码示例

本文整理汇总了C#中SessionBase.OpenSchema方法的典型用法代码示例。如果您正苦于以下问题:C# SessionBase.OpenSchema方法的具体用法?C# SessionBase.OpenSchema怎么用?C# SessionBase.OpenSchema使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionBase的用法示例。


在下文中一共展示了SessionBase.OpenSchema方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Persist

 /// <summary>
 /// Persists this object.
 /// </summary>
 /// <param name="place">The placement rules to follow when persisting this object</param>
 /// <param name="session">The session managing this object</param>
 /// <param name="persistRefs">If true, objects referenced from this object will also be persisted</param>
 /// <param name="disableFlush">If true, disables possible flushing of updated pages while persisting this object; otherwise pasge flushing may occur</param>
 /// <returns>The object id of the persistent object</returns>
 public virtual UInt64 Persist(Placement place, SessionBase session, bool persistRefs = true, bool disableFlush = false, Queue<IOptimizedPersistable> toPersist = null)
 {
   return session.Persist(place, this, session.OpenSchema(false), place.MaxObjectsPerPage, disableFlush, toPersist);
 }
开发者ID:MerlinBrasil,项目名称:VelocityDB,代码行数:12,代码来源:PersistenceByInterfaceSnake.cs

示例2: ToStringDetails

 /// <summary>
 /// Object details as a string
 /// </summary>
 /// <param name="session">The session managing this object</param>
 /// <param name="skipArrays">Indicates if string should contain detailed array data.</param>
 ///<returns>
 /// A <see cref="string"/> containing all details of this object.
 ///</returns>
 static public string ToStringDetails(this OptimizedPersistable pObj, SessionBase session, bool skipArrays = true)
 {
   Schema schema = session.OpenSchema(false);
   if (pObj.WrappedObject == null)
     return pObj.ToString() + pObj.ToStringDetails(schema, pObj.Shape, skipArrays);
   else
   {
     Array array = pObj.WrappedObject as Array;
     if (array != null)
       return pObj.WrappedObject.ToString() + " (" + array.Length + ") " + Oid.AsString(pObj.Id) + pObj.ToStringDetails(schema, pObj.Shape, skipArrays);
     else
       return pObj.WrappedObject.ToString() + " " + Oid.AsString(pObj.Id) + pObj.ToStringDetails(schema, pObj.Shape, skipArrays);
   }
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:22,代码来源:Utilities.cs


注:本文中的SessionBase.OpenSchema方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。