Beispiel #1
0
        IObjectActivator CreateObjectActivator(IDataReader dataReader)
        {
            Type type = typeof(T);

            if (type != PublicConstants.TypeOfObject && MappingTypeSystem.IsMappingType(type))
            {
                PrimitiveObjectActivatorCreator activatorCreator = new PrimitiveObjectActivatorCreator(type, 0);
                return(activatorCreator.CreateObjectActivator());
            }

            return(GetObjectActivator(type, dataReader));
        }
Beispiel #2
0
            void Prepare()
            {
                Type type = typeof(T);

                if (type != UtilConstants.TypeOfObject && MappingTypeSystem.IsMappingType(type))
                {
                    PrimitiveObjectActivatorCreator activatorCreator = new PrimitiveObjectActivatorCreator(type, 0);
                    this._objectActivator = activatorCreator.CreateObjectActivator();
                    this._reader          = this.ExecuteReader();
                    return;
                }

                this._reader          = this.ExecuteReader();
                this._objectActivator = GetObjectActivator(type, this._reader);
            }
Beispiel #3
0
            async Task Prepare(bool @async)
            {
                Type type = typeof(T);

                if (type != PublicConstants.TypeOfObject && MappingTypeSystem.IsMappingType(type))
                {
                    PrimitiveObjectActivatorCreator activatorCreator = new PrimitiveObjectActivatorCreator(type, 0);
                    this._objectActivator = activatorCreator.CreateObjectActivator();
                    this._reader          = await this.ExecuteReader(@async);

                    return;
                }

                this._reader = await this.ExecuteReader(@async);

                this._objectActivator = GetObjectActivator(type, this._reader);
            }