/// <summary>
 ///   Convert a compact binary representation of a Brush into and instance
 ///   of Brush.  The reader must be left pointing immediately after the object
 ///   data in the underlying stream.
 /// </summary>
 /// <remarks>
 /// This is called ONLY from the Parser and is not a general public method.
 /// </remarks>
 public override object ConvertCustomBinaryToObject(
     BinaryReader reader)
 {
     // ********* VERY IMPORTANT NOTE *****************
     // If this method is changed, then BamlPropertyCustomRecord.GetCustomValue() needs
     // to be correspondingly changed as well
     // ********* VERY IMPORTANT NOTE *****************
     return(SolidColorBrush.DeserializeFrom(reader));
 }
        // Token: 0x0600107A RID: 4218 RVA: 0x000418F4 File Offset: 0x0003FAF4
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            this._stream.Position = 0L;
            switch (this._converterId)
            {
            case 744:
                return(SolidColorBrush.DeserializeFrom(this._reader, new DeferredBinaryDeserializerExtension.DeferredBinaryDeserializerExtensionContext(serviceProvider, this._freezer, this._canFreeze)));

            case 746:
                return(Parsers.DeserializeStreamGeometry(this._reader));

            case 747:
                return(Point3DCollection.DeserializeFrom(this._reader));

            case 748:
                return(PointCollection.DeserializeFrom(this._reader));

            case 752:
                return(Vector3DCollection.DeserializeFrom(this._reader));
            }
            throw new NotImplementedException();
        }
Example #3
0
        // Token: 0x06001FAC RID: 8108 RVA: 0x000953F8 File Offset: 0x000935F8
        internal object GetCustomValue(BinaryReader reader, Type propertyType, short serializerId, BamlRecordReader bamlRecordReader)
        {
            if (serializerId != 46)
            {
                if (serializerId != 195)
                {
                    switch (serializerId)
                    {
                    case 744:
                        this._valueObject = SolidColorBrush.DeserializeFrom(reader, bamlRecordReader.TypeConvertContext);
                        goto IL_11D;

                    case 745:
                        this._valueObject = XamlInt32CollectionSerializer.StaticConvertCustomBinaryToObject(reader);
                        goto IL_11D;

                    case 746:
                        this._valueObject = XamlPathDataSerializer.StaticConvertCustomBinaryToObject(reader);
                        goto IL_11D;

                    case 747:
                        this._valueObject = XamlPoint3DCollectionSerializer.StaticConvertCustomBinaryToObject(reader);
                        goto IL_11D;

                    case 748:
                        this._valueObject = XamlPointCollectionSerializer.StaticConvertCustomBinaryToObject(reader);
                        goto IL_11D;

                    case 752:
                        this._valueObject = XamlVector3DCollectionSerializer.StaticConvertCustomBinaryToObject(reader);
                        goto IL_11D;
                    }
                    return(null);
                }
                uint num;
                if (this._valueObject == null)
                {
                    num = reader.ReadUInt32();
                }
                else
                {
                    num = (uint)this._valueObject;
                }
                if (propertyType.IsEnum)
                {
                    this._valueObject      = Enum.ToObject(propertyType, num);
                    this.ValueObjectSet    = true;
                    this.IsRawEnumValueSet = false;
                }
                else
                {
                    this._valueObject      = num;
                    this.ValueObjectSet    = false;
                    this.IsRawEnumValueSet = true;
                }
                return(this._valueObject);
            }
            else
            {
                byte b = reader.ReadByte();
                this._valueObject = (b == 1);
            }
IL_11D:
            this.ValueObjectSet = true;
            return(this._valueObject);
        }
 // Token: 0x06002272 RID: 8818 RVA: 0x000AB5C3 File Offset: 0x000A97C3
 public override object ConvertCustomBinaryToObject(BinaryReader reader)
 {
     return(SolidColorBrush.DeserializeFrom(reader));
 }