public ReflectionObjectMessagePackSerializer(SerializationContext context, SerializationTarget target, SerializerCapabilities capabilities)
            : base(context, capabilities)
        {
            ReflectionSerializerHelper.GetMetadata(typeof(T), target.Members, context, out this._getters, out this._setters, out this._memberInfos, out this._contracts, out this._serializers);
            this._memberIndexes =
                this._contracts
                .Select((contract, index) => new KeyValuePair <string, int>(contract.Name, index))
                .Where(kv => kv.Key != null)
                // Set key as transformed.
                .ToDictionary(kv => context.DictionarySerlaizationOptions.SafeKeyTransformer(kv.Key), kv => kv.Value);
            this._constructorParameters =
                (!typeof(IUnpackable).IsAssignableFrom(typeof(T)) && target.IsConstructorDeserialization)
                                        ? target.DeserializationConstructor.GetParameters()
                                        : null;
            if (this._constructorParameters != null)
            {
                this._constructorArgumentIndexes = new Dictionary <int, int>(this._memberIndexes.Count);
                foreach (var member in target.Members)
                {
                    int index =
#if SILVERLIGHT && !WINDOWS_PHONE
                        this._constructorParameters.FindIndex(
#else
                        Array.FindIndex(this._constructorParameters,
#endif // SILVERLIGHT && !WINDOWS_PHONE
                            item => item.Name.Equals(member.Contract.Name, StringComparison.OrdinalIgnoreCase) && item.ParameterType == member.Member.GetMemberValueType()
                            );
                    if (index >= 0)
                    {
                        this._constructorArgumentIndexes.Add(index, this._memberIndexes[member.Contract.Name]);
                    }
                }
            }
        }
 public ReflectionObjectMessagePackSerializer(SerializationContext context)
     : base(context)
 {
     ReflectionSerializerHelper.GetMetadata(context, typeof(T), out this._getters, out this._setters, out this._memberInfos, out this._contracts, out this._serializers);
     this._memberIndexes =
         this._contracts
         .Select((contract, index) => new KeyValuePair <string, int>(contract.Name, index))
         .Where(kv => kv.Key != null)
         .ToDictionary(kv => kv.Key, kv => kv.Value);
 }