Skip to content

Commit a82ad56

Browse files
committed
- add demo validation parameters
- fix log outputs
1 parent 17714b4 commit a82ad56

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

NetLicensingClient-demo/NetLicensingClient-demo.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ static int Main(string[] args)
201201
ConsoleWriter.WriteEntity("Added license:", license);
202202

203203
List<License> licenses = LicenseService.list(context, null);
204-
ConsoleWriter.WriteList("Got the following license templates:", licenses);
204+
ConsoleWriter.WriteList("Got the following licenses:", licenses);
205205

206206
LicenseService.delete(context, demoLicenseNumber);
207207
Console.WriteLine("Deleted license");
208208

209209
licenses = LicenseService.list(context, null);
210-
ConsoleWriter.WriteList("Got the following license templates:", licenses);
210+
ConsoleWriter.WriteList("Got the following licenses:", licenses);
211211

212212
license = LicenseService.create(context, demoLicenseeNumber, demoLicenseTemplate1_Number, null, newLicense);
213213
ConsoleWriter.WriteEntity("Added license again:", license);
@@ -234,7 +234,7 @@ static int Main(string[] args)
234234
Token newToken = new Token();
235235
newToken.tokenType = Constants.Token.TYPE_APIKEY;
236236
Token apiKey = TokenService.create(context, newToken);
237-
ConsoleWriter.WriteEntity("Created API Key:", apiKey);
237+
ConsoleWriter.WriteEntity("Created APIKey:", apiKey);
238238
context.apiKey = apiKey.number;
239239

240240
newToken.tokenType = Constants.Token.TYPE_SHOP;
@@ -259,13 +259,14 @@ static int Main(string[] args)
259259
#region ****************** Validate
260260

261261
ValidationParameters validationParameters = new ValidationParameters();
262+
validationParameters.put(demoProductModuleNumber, "paramKey", "paramValue");
262263
ValidationResult validationResult = LicenseeService.validate(context, demoLicenseeNumber, demoProductNumber, demoLicenseeName, validationParameters);
263264
ConsoleWriter.WriteEntity("Validation result for created licensee:", validationResult);
264265

265266
context.securityMode = SecutiryMode.APIKEY_IDENTIFICATION;
266267
validationResult = LicenseeService.validate(context, demoLicenseeNumber, demoProductNumber, demoLicenseeName, validationParameters);
267268
context.securityMode = SecutiryMode.BASIC_AUTHENTICATION;
268-
ConsoleWriter.WriteEntity("Validation repeated with API Key:", validationResult);
269+
ConsoleWriter.WriteEntity("Validation repeated with APIKey:", validationResult);
269270

270271
#endregion
271272

NetLicensingClient.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Global
5151
{FB28E724-5CC0-4E48-ABED-8E111A955399}.Release|x86.Build.0 = Release|Any CPU
5252
EndGlobalSection
5353
GlobalSection(MonoDevelopProperties) = preSolution
54-
StartupItem = NetLicensingDemo\NetLicensingDemo.csproj
54+
StartupItem = NetLicensingClient-demo\NetLicensingClient-demo.csproj
5555
Policies = $0
5656
$0.DotNetNamingPolicy = $1
5757
$1.DirectoryNamespaceAssociation = None

NetLicensingClient/Entities/Constants.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ public class License
6161
{
6262
internal const String ENDPOINT_PATH = "license";
6363
internal const String TYPE_NAME = "License";
64-
public const String PROP_PARENT_FEATURE = "parentFeature";
65-
public const String PROP_TIME_VOLUME = "timeVolume";
66-
public const String PROP_START_DATE = "startDate";
6764
}
6865

6966
public class Transaction

NetLicensingDemo/NetLicensingDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
6060
<ProjectExtensions>
6161
<MonoDevelop>
62-
<Properties>
62+
<Properties VerifyCodeBehindFields="True" VerifyCodeBehindEvents="True">
6363
<Policies>
6464
<TextStylePolicy inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />
6565
<CSharpFormattingPolicy IndentSwitchBody="True" AnonymousMethodBraceStyle="NextLine" PropertyBraceStyle="NextLine" PropertyGetBraceStyle="NextLine" PropertySetBraceStyle="NextLine" EventBraceStyle="NextLine" EventAddBraceStyle="NextLine" EventRemoveBraceStyle="NextLine" StatementBraceStyle="NextLine" ElseNewLinePlacement="NewLine" CatchNewLinePlacement="NewLine" FinallyNewLinePlacement="NewLine" WhileNewLinePlacement="DoNotCare" ArrayInitializerWrapping="DoNotChange" ArrayInitializerBraceStyle="NextLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />

0 commit comments

Comments
 (0)