Esempio n. 1
0
 public virtual string ToString(object @object)
 {
     NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo coi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo
                                                                      )@object;
     System.Text.StringBuilder buffer = new System.Text.StringBuilder();
     // TODO escape ;
     buffer.Append(classId).Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer
                                   .FieldSeparator);
     buffer.Append(coi.GetRealCollectionClassName()).Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer
                                                            .FieldSeparator);
     buffer.Append(coi.GetCollection().Count).Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer
                                                     .FieldSeparator);
     buffer.Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.
                   CollectionStart);
     System.Collections.IEnumerator iterator = coi.GetCollection().GetEnumerator();
     while (iterator.MoveNext())
     {
         buffer.Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.
                       GetInstance().ToString(iterator.Current));
         if (iterator.MoveNext())
         {
             buffer.Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.
                           CollectionElementSeparator);
         }
     }
     buffer.Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.
                   CollectionEnd);
     return(buffer.ToString());
 }