Represents an implementation of data view support that returns the stream of XML containing the data view support elements.
상속: DataViewSupport
예제 #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);
        }