ScriptFactory Class

Static functions for creating different types of scripts.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory

Namespace:  Microsoft.SqlServer.Management.UI.VSIntegration.Editors
Assembly:  SQLEditors.VS (in SQLEditors.VS.dll)

Syntax

'Declaration
Public NotInheritable Class ScriptFactory _
    Implements IScriptFactory
'Usage
Dim instance As ScriptFactory
public sealed class ScriptFactory : IScriptFactory
public ref class ScriptFactory sealed : IScriptFactory
[<SealedAttribute>]
type ScriptFactory =  
    class
        interface IScriptFactory
    end
public final class ScriptFactory implements IScriptFactory

The ScriptFactory type exposes the following members.

Properties

  Name Description
Public property CurrentlyActiveWndConnectionInfo Gets the connection information of the currently active frame. If the active frame is not one of the window based windows and doesn't have connection information associated with it, the property returns null.
Public propertyStatic member Instance Gets the script factory.
Public propertyStatic member NewSqlTemplateCaptionRoot Gets the root used to auto-generate names for the SQL template files.
Public property OpenFileMode Gets or sets the current file open mode used to control the behavior in obtaining a current connection for each file opened.

Top

Methods

  Name Description
Public method CheckAndCancelRunningQueries Used to ensure that there are no queries left running. For every running query, user will be prompted whether to cancel it.
Public method CheckDefaultKeyboardScheme Checks the default Keyboard Scheme from Environment Options.
Public method CreateNewBlankScript(ScriptType) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to the miscellaneous project.
Public method CreateNewBlankScript(ScriptType, IVsProject) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to to the specified project.
Public method CreateNewBlankScript(ScriptType, UIConnectionGroupInfo, IDbConnection) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to the miscellaneous project.
Public method CreateNewBlankScript(ScriptType, UIConnectionInfo, IDbConnection) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to the miscellaneous project.
Public method CreateNewBlankScript(ScriptType, IVsProject, UIConnectionGroupInfo, IDbConnection) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to the specified project.
Public method CreateNewBlankScript(ScriptType, IVsProject, UIConnectionInfo, IDbConnection) Creates and opens new blank script of type of editor that is implemented by the assembly. The new script is added to the specified project.
Public method CreateNewScript(String, UIConnectionGroupInfo, IDbConnection) Creates and opens new blank script of specified template file that is implemented by the assembly. The editor for this script should be implemented by this assembly. The new script is added to the miscellaneous project.
Public method CreateNewScript(String, UIConnectionInfo, IDbConnection) Creates and opens new blank script of specified template file that is implemented by the assembly. The editor for this script should be implemented by this assembly. The new script is added to the miscellaneous project.
Public method CreateNewScript(String, UIConnectionGroupInfo, IDbConnection, String) Creates and opens new blank script of specified template file that is implemented by the assembly. The editor for this script should be implemented by this assembly. The new script is added to the miscellaneous project.
Public method CreateNewScript(String, UIConnectionInfo, IDbConnection, String) Creates and opens new blank script of specified template file that is implemented by the assembly. The editor for this script should be implemented by this assembly. The new script is added to the miscellaneous project.
Public method CreateNewScript(String, IVsProject, UIConnectionGroupInfo, IDbConnection) Creates and opens new blank script of specified file and adds it to the specified project.
Public method CreateNewScript(String, IVsProject, UIConnectionInfo, IDbConnection) Creates and opens new blank script of specified file and adds it to the specified project.
Public method CreateNewScript(String, IVsProject, UIConnectionGroupInfo, IDbConnection, String) Creates and opens new blank script of specified file and adds it to the specified project.
Public method CreateNewScript(String, IVsProject, UIConnectionInfo, IDbConnection, String) Creates and opens new blank script of specified file and adds it to the specified project.
Public method CreateNewScriptBasedOnTemplate(String, String, Boolean) Creates a temporary query file with specified extension based on given template, opens it in Misc project, which will create a snapshot of the file, and delete the previously created query file. Without this method, Visual Studio would always create a new file with the same extension as the template.
Public method CreateNewScriptBasedOnTemplate(String, String, Boolean, IVsProject) Creates a temporary query file with specified extension based on given template, opens it in Misc project, which will create a snapshot of the file, and delete the previously created query file. Without this method, Visual Studio would always create a new file with the same extension as the template.
Public method CreateNewSqlObjectDocument Creates a new SQL script with an URL as a moniker.
Public method DesignTableOrView Used by external components to create a new instance of an assisted editor of a given type. Propagates back any exception that was raised during the initialization of the editor.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetFontAndColorProvider Gets the font and color provider.
Public method GetHashCode (Inherited from Object.)
Public method GetScriptTypeForWindow Gets the script type that is being edited by the given Visual Studio window.
Public method GetType (Inherited from Object.)
Public method GetVdtPreloader Gets a preloader for VDT code.
Public method InstallDatabaseDiagramSupportObjects Used by other assemblies to make sure that database diagram support objects are installed.
Protected method MemberwiseClone (Inherited from Object.)
Public method ProcessDroppedFilesAsync Processes dropped files by marshalling a control that calls a delegate to do the work.
Public method ScheduleSqlScriptAsOneStep(String, SqlConnectionInfo, IWin32Window) Activates the schedule dialog box and creates a job with one Transact-SQL step that corresponds to the specified text.
Public method ScheduleSqlScriptAsOneStep(String, SqlConnectionInfo, IServiceProvider, IWin32Window) Activates the schedule dialog box and creates a job with one Transact-SQL step that corresponds to the specified text.
Public method ToString (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member ShowPlanEditorFactoryGuid Show plan editor factory identifier.
Public fieldStatic member SqlCeEditorFactoryGuid SQL Server Compact 3.5 editor factory identifier.
Public fieldStatic member SqlCeEditorFactoryOrigGuid The Guid of the SQL Server Compact 3.5 editor factory.
Public fieldStatic member SqlEditorFactoryWithEncodingGuid The Guid of the SQL editor factory with encoding.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.