Exemple #1
0
        protected override void Deserialize()
        {
            base.Deserialize();

            _Format = Properties.Find( "Format" );
            MipMaps = new UArray<MipMap>();
            MipMaps.Deserialize( _Buffer, delegate( MipMap mm ){ mm.Owner = this; } );
        }
        protected override void Deserialize()
        {
            base.Deserialize();

            _Format = Properties.Find("Format");
            MipMaps = new UArray <MipMap>();
            MipMaps.Deserialize(_Buffer, delegate(MipMap mm){ mm.Owner = this; });
        }
Exemple #3
0
        /// <summary>
        /// Tries to read all properties that resides in this object instance.
        /// </summary>
        protected void DeserializeProperties()
        {
            Default = this;
            _Properties = new DefaultPropertiesCollection();
            while( true )
            {
                var tag = new UDefaultProperty( Default );
                if( !tag.Deserialize() )
                {
                    break;
                }
                _Properties.Add( tag );
            }

            // We need to keep the MemoryStream alive,
            // because we first deserialize the defaultproperties but we skip the values, which we'll deserialize later on by demand.
            if( Properties.Count == 0 )
            {
                _Properties = null;
            }
        }