Skip to content

Commit c541131

Browse files
author
Denis Peshkov
committed
- Added support of these conversions: "Byte -> number" and "GUID -> string"
1 parent 7728915 commit c541131

6 files changed

Lines changed: 21 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
packages
2+
sign
23

34
# User files
45
*.suo

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on the official Visual Studio extension gallery.
1818
- [x] Dynamic build module name from server dto's namespace
1919
- [x] Added an Options.EOLType (to choose the EOL type Windows/Unix)
2020
- [x] Added the Options.IndentTab and Options.IndentTabSize (to convert the tab indentations into spaces)
21+
- [x] Added support while converting for "Byte -> number" and "GUID -> string"
2122

2223
## 2.1.0
2324

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ for:
2222
install:
2323
- ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/denis-peshkov/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
2424
before_build:
25-
- ps: Vsix-IncrementVsixVersion -initialVersion 2.1.0.0 -updateVsixCsVersion | Vsix-UpdateBuildVersion
25+
- ps: Vsix-IncrementVsixVersion -initialVersion 2.2.0.0 -updateVsixCsVersion | Vsix-UpdateBuildVersion
2626
after_test:
2727
- ps: Vsix-PushArtifacts | Vsix-PublishToGallery
2828

src/TypeScriptDefinitionGenerator/Generator/IntellisenseType.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class IntellisenseType
3434
public IEnumerable<IntellisenseProperty> Shape { get; set; }
3535

3636
public bool IsKnownType { get { return TypeScriptName != "any"; } }
37-
37+
3838
public string TypeScriptName
3939
{
4040
get
@@ -51,13 +51,14 @@ private string GetTargetName(string codeName, bool js)
5151
case "int16":
5252
case "int32":
5353
case "int64":
54+
case "byte":
5455
case "short":
5556
case "int":
5657
case "long":
58+
case "biginteger":
5759
case "float":
5860
case "double":
5961
case "decimal":
60-
case "biginteger":
6162
return js ? "Number" : "number";
6263

6364
case "datetime":
@@ -66,6 +67,7 @@ private string GetTargetName(string codeName, bool js)
6667
case "system.datetimeoffset":
6768
return "Date";
6869

70+
case "guid":
6971
case "string":
7072
return js ? "String" : "string";
7173

src/TypeScriptDefinitionGenerator/source.extension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static class Vsix
1111
public const string Name = "TypeScript Definition Generator";
1212
public const string Description = @"Creates and synchronizes TypeScript Definition files (d.ts) from C# model classes to build strongly typed web application where the server- and client-side models are in sync. Works on all .NET project types";
1313
public const string Language = "en-US";
14-
public const string Version = "2.1.0.0";
14+
public const string Version = "2.2.0.0";
1515
public const string Author = "Denis Peshkov";
1616
public const string Tags = "Code Generator, d.ts, dto, model, TypeScript, TypeScript generator";
1717
}

src/TypeScriptDefinitionGenerator/source.extension.vsixmanifest

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="5cb4e919-c9ff-4026-bd39-fd323a14fac7" Version="2.1.0.0" Language="en-US" Publisher="Denis Peshkov" />
4+
<Identity Id="5cb4e919-c9ff-4026-bd39-fd323a14fac7" Version="2.2.0.0" Language="en-US" Publisher="Denis Peshkov" />
55
<DisplayName>TypeScript Definition Generator</DisplayName>
66
<Description xml:space="preserve">Creates and synchronizes TypeScript Definition files (d.ts) from C# model classes to build strongly typed web application where the server- and client-side models are in sync. Works on all .NET project types</Description>
77
<MoreInfo>https://github.com/denis-peshkov/TypeScriptDefinitionGenerator</MoreInfo>
@@ -13,12 +13,20 @@
1313
<Tags>Code Generator, d.ts, dto, model, TypeScript, TypeScript generator</Tags>
1414
</Metadata>
1515
<Installation>
16-
<InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Community" />
17-
<InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Enterprise" />
18-
<InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
16+
<!--
17+
Version ProgID
18+
Visual Studio 2010 VisualStudio.DTE.10.0
19+
Visual Studio 2012 VisualStudio.DTE.11.0
20+
Visual Studio 2013 VisualStudio.DTE.12.0
21+
Visual Studio 2015 VisualStudio.DTE.14.0
22+
Visual Studio 2017 VisualStudio.DTE.15.0
23+
-->
24+
<InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Community" />
25+
<InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Enterprise" />
26+
<InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
1927
</Installation>
2028
<Prerequisites>
21-
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
29+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[14.0,16.0)" DisplayName="Visual Studio core editor" />
2230
</Prerequisites>
2331
<Assets>
2432
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />

0 commit comments

Comments
 (0)