/// <summary> /// Retrieves a service of the specified type. Following services are /// supported: /// DataViewSupport – information about view schema. /// DataObjectSupport – information about object model. /// </summary> /// <param name="serviceType">A service type.</param> /// <returns> /// Returns the service of the specified type, or returns a null reference /// if no service was found. /// </returns> protected override object GetServiceImpl(Type serviceType) { if (serviceType == typeof(DataViewSupport)) { if (viewSupport == null) { viewSupport = new MySqlDataViewSupport(); } return(viewSupport); } else if (serviceType == typeof(DataObjectSupport)) { if (objectSupport == null) { objectSupport = new MySqlDataObjectSupport(); } return(objectSupport); } else if (serviceType == typeof(DataSourceInformation)) { if (sourceInformation == null) { sourceInformation = new MySqlDataSourceInformation(Site as DataConnection); } return(sourceInformation); } else { return(base.GetServiceImpl(serviceType)); } }
/// <summary> /// Retrieves a service of the specified type. Following services are /// supported: /// DataViewSupport – information about view schema. /// DataObjectSupport – information about object model. /// </summary> /// <param name="serviceType">A service type.</param> /// <returns> /// Returns the service of the specified type, or returns a null reference /// if no service was found. /// </returns> protected override object GetServiceImpl(Type serviceType) { if (serviceType == typeof(DataViewSupport)) { if (viewSupport == null) { viewSupport = new MySqlDataViewSupport(); } return viewSupport; } else if (serviceType == typeof(DataObjectSupport)) { if (objectSupport == null) { objectSupport = new MySqlDataObjectSupport(); } return objectSupport; } else if (serviceType == typeof(DataSourceInformation)) { if (sourceInformation == null) { sourceInformation = new MySqlDataSourceInformation(Site as DataConnection); } return sourceInformation; } else return base.GetServiceImpl(serviceType); }