From 2483d92a3003992b3cd52d0ebf1d2fcf9690efad Mon Sep 17 00:00:00 2001 From: yugangw-msft Date: Wed, 7 Oct 2015 21:27:15 -0700 Subject: [PATCH] fix code analysis error --- AutoRest/Generators/NodeJS/NodeJS/NodeJSCodeGenerator.cs | 2 +- .../NodeJS/NodeJS/TemplateModels/ModelTemplateModel.cs | 2 +- .../Generators/NodeJS/NodeJS/Templates/ModelTemplateTS.cshtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AutoRest/Generators/NodeJS/NodeJS/NodeJSCodeGenerator.cs b/AutoRest/Generators/NodeJS/NodeJS/NodeJSCodeGenerator.cs index 6a229fb14d..f6ca7c5511 100644 --- a/AutoRest/Generators/NodeJS/NodeJS/NodeJSCodeGenerator.cs +++ b/AutoRest/Generators/NodeJS/NodeJS/NodeJSCodeGenerator.cs @@ -15,7 +15,7 @@ namespace Microsoft.Rest.Generator.NodeJS public class NodeJSCodeGenerator : CodeGenerator { private const string ClientRuntimePackage = "ms-rest version 1.1.0"; - private static readonly bool DisableTypeScriptGeneration = false; // Change to true if you want to no longer generate the 3 d.ts files, for some reason + private const bool DisableTypeScriptGeneration = false; // Change to true if you want to no longer generate the 3 d.ts files, for some reason public NodeJsCodeNamer Namer { get; private set; } diff --git a/AutoRest/Generators/NodeJS/NodeJS/TemplateModels/ModelTemplateModel.cs b/AutoRest/Generators/NodeJS/NodeJS/TemplateModels/ModelTemplateModel.cs index 18fe738ef1..247d3473fc 100644 --- a/AutoRest/Generators/NodeJS/NodeJS/TemplateModels/ModelTemplateModel.cs +++ b/AutoRest/Generators/NodeJS/NodeJS/TemplateModels/ModelTemplateModel.cs @@ -158,7 +158,7 @@ public bool ContainsPropertiesInCompositeType() /// Model property to query /// Pass true if generating the code for the models module, thus model types don't need a "models." prefix /// TypeScript property definition - public string PropertyTS(Property property, bool inModelsModule) { + public static string PropertyTS(Property property, bool inModelsModule) { if (property == null) { throw new ArgumentNullException("property"); } diff --git a/AutoRest/Generators/NodeJS/NodeJS/Templates/ModelTemplateTS.cshtml b/AutoRest/Generators/NodeJS/NodeJS/Templates/ModelTemplateTS.cshtml index d06fd55331..d96f77fe9f 100644 --- a/AutoRest/Generators/NodeJS/NodeJS/Templates/ModelTemplateTS.cshtml +++ b/AutoRest/Generators/NodeJS/NodeJS/Templates/ModelTemplateTS.cshtml @@ -22,7 +22,7 @@ export interface @(Model.Name) { var propertyList = new List(Model.ComposedProperties); for (int i = 0; i < propertyList.Count; i++) { - @:@(Model.PropertyTS(propertyList[i], true)); + @:@(ModelTemplateModel.PropertyTS(propertyList[i], true)); } } }