Beispiel #1
0
        SerializeProperties(
            SerializableObjectContext serializableObjectContext
            )
        {
            if (serializableObjectContext == null)
            {
                throw new ArgumentNullException("serializableObjectContext");
            }

            SerializablePropertyCollection propertyCollection = serializableObjectContext.PropertiesCollection;

            if (propertyCollection != null)
            {
                for (propertyCollection.Reset();
                     propertyCollection.MoveNext();)
                {
                    SerializablePropertyContext serializablePropertyContext =
                        (SerializablePropertyContext)propertyCollection.Current;

                    if (serializablePropertyContext != null)
                    {
                        SerializeProperty(serializablePropertyContext);
                    }
                }
            }
        }
Beispiel #2
0
        SerializeNextProperty(
            SerializableObjectContext serializableObjectContext
            )
        {
            SerializablePropertyCollection propertyCollection = serializableObjectContext.PropertiesCollection;

            if (propertyCollection.MoveNext())
            {
                SerializablePropertyContext serializablePropertyContext =
                    (SerializablePropertyContext)propertyCollection.Current;

                if (serializablePropertyContext != null)
                {
                    ReachSerializerContext context = new ReachSerializerContext(this,
                                                                                serializableObjectContext,
                                                                                SerializerAction.serializeNextProperty);

                    _serializationManager.OperationStack.Push(context);
                    SerializeProperty(serializablePropertyContext);
                }
            }
        }