Exemplo n.º 1
0
        private static void ReadRootObjectComplexMember(Type memberType, BoisComplexTypeInfo complexTypeInfo, PropertyInfo prop, FieldInfo field, Type containerType, ILGenerator il, SharedVariables variableCache)
        {
            switch (complexTypeInfo.ComplexKnownType)
            {
            case EnComplexKnownType.Collection:
            case EnComplexKnownType.ISet:
                EmitGenerator.ReadGenericCollection(prop, field, null, containerType, il, complexTypeInfo.IsNullable, variableCache);
                break;

            case EnComplexKnownType.Dictionary:
                EmitGenerator.ReadDictionary(prop, field, null, containerType, il, complexTypeInfo.IsNullable, variableCache);
                break;

            case EnComplexKnownType.UnknownArray:
                EmitGenerator.ReadUnknownArray(prop, field, null, containerType, il, complexTypeInfo.IsNullable, variableCache);
                break;

            case EnComplexKnownType.NameValueColl:
                EmitGenerator.ReadNameValueColl(prop, field, null, containerType, il, complexTypeInfo.IsNullable, variableCache);
                break;

            case EnComplexKnownType.Unknown:
            default:
                EmitGenerator.ReadUnknownComplexTypeCall(memberType, prop, field, containerType, il, complexTypeInfo);
                return;
            }
        }