protected override object GetServiceImpl(Type serviceType)
    {
      if (serviceType == typeof(DataViewSupport))
      {
        if (_dataViewSupport == null) _dataViewSupport = new SQLiteDataViewSupport();
        return _dataViewSupport;
      }

      if (serviceType == typeof(DataObjectSupport))
      {
        if (_dataObjectSupport == null) _dataObjectSupport = new SQLiteDataObjectSupport();
        return _dataObjectSupport;
      }

      if (serviceType == typeof(DataObjectIdentifierResolver))
      {
        if (_dataObjectIdentifierResolver == null) _dataObjectIdentifierResolver = new SQLiteDataObjectIdentifierResolver(Site);
        return _dataObjectIdentifierResolver;
      }

      if (serviceType == typeof(DataConnectionSupport))
        return this;

      return base.GetServiceImpl(serviceType);
    }
Beispiel #2
0
        protected override object GetServiceImpl(Type serviceType)
        {
            if (serviceType == typeof(DataViewSupport))
            {
                if (_dataViewSupport == null)
                {
                    _dataViewSupport = new SQLiteDataViewSupport();
                }
                return(_dataViewSupport);
            }

            if (serviceType == typeof(DataObjectSupport))
            {
                if (_dataObjectSupport == null)
                {
                    _dataObjectSupport = new SQLiteDataObjectSupport();
                }
                return(_dataObjectSupport);
            }

            if (serviceType == typeof(DataObjectIdentifierResolver))
            {
                if (_dataObjectIdentifierResolver == null)
                {
                    _dataObjectIdentifierResolver = new SQLiteDataObjectIdentifierResolver(Site);
                }
                return(_dataObjectIdentifierResolver);
            }

            if (serviceType == typeof(DataConnectionSupport))
            {
                return(this);
            }

            return(base.GetServiceImpl(serviceType));
        }