예제 #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);
                    }
                }
            }
        }
예제 #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);
                }
            }
        }