Represents a custom data source information class for MySQL
Inheritance: AdoDotNetDataSourceInformation
示例#1
0
 /// <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));
     }
 }
示例#2
0
        /// <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);
        }