mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-22 09:35:38 -05:00
966 lines
61 KiB
HTML
966 lines
61 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE]><![endif]-->
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Class ScriptFile
|
|
</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class ScriptFile
|
|
">
|
|
<meta name="generator" content="docfx 1.0.0.0">
|
|
|
|
<link rel="shortcut icon" href="../favicon.ico">
|
|
<link rel="stylesheet" href="../styles/docfx.vendor.css">
|
|
<link rel="stylesheet" href="../styles/docfx.css">
|
|
<link rel="stylesheet" href="../styles/main.css">
|
|
<meta property="docfx:navrel" content="../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
</head>
|
|
<body data-spy="scroll" data-target="#affix">
|
|
<div id="wrapper">
|
|
<header>
|
|
|
|
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../logo.svg" alt="">
|
|
</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
<form class="navbar-form navbar-right" role="search" id="search">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div role="main" class="container body-content hide-when-search">
|
|
|
|
<div class="sidenav hide-when-search">
|
|
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
|
|
<div class="sidetoggle collapse" id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="article row grid-right">
|
|
<div class="col-md-10">
|
|
<article class="content wrap" id="_content">
|
|
|
|
|
|
<h1 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile">Class ScriptFile
|
|
</h1>
|
|
<div class="markdown level0 summary"><p>Contains the details and contents of an open script file.</p>
|
|
</div>
|
|
<div class="markdown level0 conceptual"></div>
|
|
<div class="inheritance">
|
|
<h5>Inheritance</h5>
|
|
<div class="level0"><span class="xref">System.Object</span></div>
|
|
<div class="level1"><span class="xref">ScriptFile</span></div>
|
|
</div>
|
|
<div class="inheritedMembers">
|
|
<h5>Inherited Members</h5>
|
|
<div>
|
|
<span class="xref">System.Object.Equals(System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.GetHashCode()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.GetType()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.MemberwiseClone()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.ToString()</span>
|
|
</div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>:Microsoft.SqlTools.ServiceLayer.Workspace.Contracts</h6>
|
|
<h6><strong>Assembly</strong>:Microsoft.SqlTools.ServiceLayer.dll</h6>
|
|
<h5 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class ScriptFile</code></pre>
|
|
</div>
|
|
<h3 id="constructors">Constructors
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L104">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor">ScriptFile()</h4>
|
|
<div class="markdown level1 summary"><p>Add a default constructor for testing</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ScriptFile()</code></pre>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_System_String_System_String_System_IO_TextReader_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.%23ctor(System.String%2CSystem.String%2CSystem.IO.TextReader)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L116">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_System_String_System_String_System_IO_TextReader_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor(System.String,System.String,System.IO.TextReader)">ScriptFile(String, String, TextReader)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a new ScriptFile instance by reading file contents from
|
|
the given TextReader.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ScriptFile(string filePath, string clientFilePath, TextReader textReader)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">filePath</span></td>
|
|
<td><p>The path at which the script file resides.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">clientFilePath</span></td>
|
|
<td><p>The path which the client uses to identify the file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.IO.TextReader</span></td>
|
|
<td><span class="parametername">textReader</span></td>
|
|
<td><p>The TextReader to use for reading the file's contents.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_System_String_System_String_System_String_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.%23ctor(System.String%2CSystem.String%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L135">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile__ctor_System_String_System_String_System_String_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.#ctor(System.String,System.String,System.String)">ScriptFile(String, String, String)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a new ScriptFile instance with the specified file contents.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ScriptFile(string filePath, string clientFilePath, string initialBuffer)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">filePath</span></td>
|
|
<td><p>The path at which the script file resides.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">clientFilePath</span></td>
|
|
<td><p>The path which the client uses to identify the file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">initialBuffer</span></td>
|
|
<td><p>The initial contents of the script file.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="properties">Properties
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ClientFilePath.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ClientFilePath%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L41">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ClientFilePath_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ClientFilePath*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ClientFilePath" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ClientFilePath">ClientFilePath</h4>
|
|
<div class="markdown level1 summary"><p>Gets or sets the path which the editor client uses to identify this file.
|
|
Setter for testing purposes only
|
|
virtual to allow mocking.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public virtual string ClientFilePath { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Contents.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Contents%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L60">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Contents_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Contents*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Contents" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Contents">Contents</h4>
|
|
<div class="markdown level1 summary"><p>Gets or sets a string containing the full contents of the file.
|
|
Setter for testing purposes only</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public virtual string Contents { get; set; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FilePath.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FilePath%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L34">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FilePath_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FilePath*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FilePath" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FilePath">FilePath</h4>
|
|
<div class="markdown level1 summary"><p>Gets the path at which this file resides.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string FilePath { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FileRange.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FileRange%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L76">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FileRange_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FileRange*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_FileRange" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.FileRange">FileRange</h4>
|
|
<div class="markdown level1 summary"><p>Gets a BufferRange that represents the entire content
|
|
range of the file.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public BufferRange FileRange { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html">BufferRange</a></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Id.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Id%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L26">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Id_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Id*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_Id" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.Id">Id</h4>
|
|
<div class="markdown level1 summary"><p>Gets a unique string that identifies this file. At this time,
|
|
this property returns a normalized version of the value stored
|
|
in the FilePath property.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string Id { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_IsInMemory.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.IsInMemory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L54">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_IsInMemory_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.IsInMemory*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_IsInMemory" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.IsInMemory">IsInMemory</h4>
|
|
<div class="markdown level1 summary"><p>Gets a boolean that determines whether this file is
|
|
in-memory or not (either unsaved or non-file content).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public bool IsInMemory { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Boolean</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SyntaxMarkers.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SyntaxMarkers%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L82">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SyntaxMarkers_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SyntaxMarkers*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SyntaxMarkers" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SyntaxMarkers">SyntaxMarkers</h4>
|
|
<div class="markdown level1 summary"><p>Gets the list of syntax markers found by parsing this
|
|
file's contents.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ScriptFileMarker[] SyntaxMarkers { get; }</code></pre>
|
|
</div>
|
|
<h5 class="propertyValue">Property Value</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.html">ScriptFileMarker</a>[]</td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ApplyChange_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_FileChange_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ApplyChange(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L244">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ApplyChange_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ApplyChange*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ApplyChange_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_FileChange_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ApplyChange(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange)">ApplyChange(FileChange)</h4>
|
|
<div class="markdown level1 summary"><p>Applies the provided FileChange to the file's contents</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ApplyChange(FileChange fileChange)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.html">FileChange</a></td>
|
|
<td><span class="parametername">fileChange</span></td>
|
|
<td><p>The FileChange to apply to the file's contents.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_CalculatePosition_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferPosition_System_Int32_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.CalculatePosition(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L334">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_CalculatePosition_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.CalculatePosition*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_CalculatePosition_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferPosition_System_Int32_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.CalculatePosition(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition,System.Int32,System.Int32)">CalculatePosition(BufferPosition, Int32, Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates a FilePosition relative to a starting BufferPosition
|
|
using the given 1-based line and column offset.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public FilePosition CalculatePosition(BufferPosition originalPosition, int lineOffset, int columnOffset)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html">BufferPosition</a></td>
|
|
<td><span class="parametername">originalPosition</span></td>
|
|
<td><p>The original BufferPosition from which an new position should be calculated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">lineOffset</span></td>
|
|
<td><p>The 1-based line offset added to the original position in this file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">columnOffset</span></td>
|
|
<td><p>The 1-based column offset added to the original position in this file.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.html">FilePosition</a></td>
|
|
<td><p>A new FilePosition instance with the resulting line and column number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLine_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLine(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L156">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLine_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLine*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLine_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLine(System.Int32)">GetLine(Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Gets a line from the file's contents.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string GetLine(int lineNumber)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">lineNumber</span></td>
|
|
<td><p>The 1-based line number in the file.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><p>The complete line at the given line number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLinesInRange_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferRange_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLinesInRange(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L171">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLinesInRange_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLinesInRange*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetLinesInRange_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferRange_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetLinesInRange(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange)">GetLinesInRange(BufferRange)</h4>
|
|
<div class="markdown level1 summary"><p>Gets a range of lines from the file's contents. Virtual method to allow for
|
|
mocking.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public virtual string[] GetLinesInRange(BufferRange bufferRange)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html">BufferRange</a></td>
|
|
<td><span class="parametername">bufferRange</span></td>
|
|
<td><p>The buffer range from which lines will be extracted.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span>[]</td>
|
|
<td><p>An array of strings from the specified range of the file.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetOffsetAtPosition_System_Int32_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetOffsetAtPosition(System.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L302">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetOffsetAtPosition_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetOffsetAtPosition*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetOffsetAtPosition_System_Int32_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetOffsetAtPosition(System.Int32,System.Int32)">GetOffsetAtPosition(Int32, Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the zero-based character offset of a given
|
|
line and column position in the file.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public int GetOffsetAtPosition(int lineNumber, int columnNumber)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">lineNumber</span></td>
|
|
<td><p>The 1-based line number from which the offset is calculated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">columnNumber</span></td>
|
|
<td><p>The 1-based column number from which the offset is calculated.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><p>The zero-based offset for the given file position.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetPositionAtOffset_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetPositionAtOffset(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L356">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetPositionAtOffset_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetPositionAtOffset*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetPositionAtOffset_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetPositionAtOffset(System.Int32)">GetPositionAtOffset(Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the 1-based line and column number position based
|
|
on the given buffer offset.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public BufferPosition GetPositionAtOffset(int bufferOffset)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">bufferOffset</span></td>
|
|
<td><p>The buffer offset to convert.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html">BufferPosition</a></td>
|
|
<td><p>A new BufferPosition containing the position of the offset.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetRangeBetweenOffsets_System_Int32_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetRangeBetweenOffsets(System.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L372">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetRangeBetweenOffsets_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetRangeBetweenOffsets*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_GetRangeBetweenOffsets_System_Int32_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.GetRangeBetweenOffsets(System.Int32,System.Int32)">GetRangeBetweenOffsets(Int32, Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the 1-based line and column number range based on
|
|
the given start and end buffer offsets.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public BufferRange GetRangeBetweenOffsets(int startOffset, int endOffset)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">startOffset</span></td>
|
|
<td><p>The start offset of the range.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">endOffset</span></td>
|
|
<td><p>The end offset of the range.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html">BufferRange</a></td>
|
|
<td><p>A new BufferRange containing the positions in the offset range.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SetFileContents_System_String_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SetFileContents(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L429">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SetFileContents_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SetFileContents*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_SetFileContents_System_String_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.SetFileContents(System.String)">SetFileContents(String)</h4>
|
|
<div class="markdown level1 summary"><p>Set the script files contents</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void SetFileContents(string fileContents)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.String</span></td>
|
|
<td><span class="parametername">fileContents</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferPosition_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L209">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_BufferPosition_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition(Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition)">ValidatePosition(BufferPosition)</h4>
|
|
<div class="markdown level1 summary"><p>Throws ArgumentOutOfRangeException if the given position is outside
|
|
of the file's buffer extents.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ValidatePosition(BufferPosition bufferPosition)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html">BufferPosition</a></td>
|
|
<td><span class="parametername">bufferPosition</span></td>
|
|
<td><p>The position in the buffer to be validated.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_System_Int32_System_Int32_.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition(System.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L222">View Source</a>
|
|
</span>
|
|
<a id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition*"></a>
|
|
<h4 id="Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile_ValidatePosition_System_Int32_System_Int32_" data-uid="Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.ValidatePosition(System.Int32,System.Int32)">ValidatePosition(Int32, Int32)</h4>
|
|
<div class="markdown level1 summary"><p>Throws ArgumentOutOfRangeException if the given position is outside
|
|
of the file's buffer extents.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ValidatePosition(int line, int column)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">line</span></td>
|
|
<td><p>The 1-based line to be validated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">column</span></td>
|
|
<td><p>The 1-based column to be validated.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="hidden-sm col-md-2" role="complementary">
|
|
<div class="sideaffix">
|
|
<div class="contribution">
|
|
<ul class="nav">
|
|
<li>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/new/master/docs/apispec/new?filename=Microsoft_SqlTools_ServiceLayer_Workspace_Contracts_ScriptFile.md&value=---%0Auid%3A%20Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/Microsoft/sqltoolsservice/blob/master/src/Microsoft.SqlTools.ServiceLayer/Workspace/Contracts/ScriptFile.cs/#L17" class="contribution-link">View Source</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
|
|
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<div class="grad-bottom"></div>
|
|
<div class="footer">
|
|
<div class="container">
|
|
<span class="pull-right">
|
|
<a href="#top">Back to top</a>
|
|
</span>
|
|
|
|
<span>Copyright © 2015-2016 Microsoft<br>Generated by <strong>DocFX</strong></span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
|
|
<script type="text/javascript" src="../styles/docfx.js"></script>
|
|
<script type="text/javascript" src="../styles/main.js"></script>
|
|
</body>
|
|
</html>
|