Share via


ScriptFactory.CreateNewScriptBasedOnTemplate Method (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.

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

Syntax

'Declaration
Public Sub CreateNewScriptBasedOnTemplate ( _
    fullPathToTemplate As String, _
    desiredExtension As String, _
    isInParamSubstMode As Boolean _
)
'Usage
Dim instance As ScriptFactory 
Dim fullPathToTemplate As String 
Dim desiredExtension As String 
Dim isInParamSubstMode As Boolean

instance.CreateNewScriptBasedOnTemplate(fullPathToTemplate, _
    desiredExtension, isInParamSubstMode)
public void CreateNewScriptBasedOnTemplate(
    string fullPathToTemplate,
    string desiredExtension,
    bool isInParamSubstMode
)
public:
virtual void CreateNewScriptBasedOnTemplate(
    String^ fullPathToTemplate, 
    String^ desiredExtension, 
    bool isInParamSubstMode
) sealed
abstract CreateNewScriptBasedOnTemplate : 
        fullPathToTemplate:string * 
        desiredExtension:string * 
        isInParamSubstMode:bool -> unit  
override CreateNewScriptBasedOnTemplate : 
        fullPathToTemplate:string * 
        desiredExtension:string * 
        isInParamSubstMode:bool -> unit
public final function CreateNewScriptBasedOnTemplate(
    fullPathToTemplate : String, 
    desiredExtension : String, 
    isInParamSubstMode : boolean
)

Parameters

  • fullPathToTemplate
    Type: System.String
    A string value that specifies the full path to the script.
  • desiredExtension
    Type: System.String
    A string value that specifies the extension for the new query that will be created based on template.
  • isInParamSubstMode
    Type: System.Boolean
    A Boolean value that specifies whether the query editor should start in template params substitution mode or in regular mode.

See Also

Reference

ScriptFactory Class

CreateNewScriptBasedOnTemplate Overload

Microsoft.SqlServer.Management.UI.VSIntegration.Editors Namespace