Ejemplo n.º 1
0
 public FieldViewModel(IOptimizedPersistable parentObj, DataMember member, ObjectViewModel parentObject, SessionBase session)
     : base(parentObject, true)
 {
     _session          = session;
     page              = parentObj.Page;
     memberObj         = member.GetMemberValue(parentObj.WrappedObject);
     isEncodedOidArray = (parentObj as BTreeNode) != null && memberObj != null && (memberObj as Array) != null && (member.Field.Name == "keysArray" || member.Field.Name == "valuesArray");
     fieldAsString     = OptimizedPersistable.ToStringDetails(member, parentObj.WrappedObject, parentObj, parentObj.Page, true);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Object details as a string
        /// </summary>
        /// <param name="pObj">The object extended</param>
        /// <param name="session">The session managing this object</param>
        /// <param name="skipArrays">Indicates if string should contain detailed array data.</param>
        ///<returns><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));
                }
            }
        }
Ejemplo n.º 3
0
 public FieldViewModelNoExpansions(IOptimizedPersistable parentObj, DataMember member, ObjectViewModel parentView, SessionBase session)
     : base(parentView, true)
 {
     fieldAsString = OptimizedPersistable.ToStringDetails(member, parentObj.WrappedObject, parentObj, parentObj.Page, true);
 }