Skip to content

Commit

Permalink
Fixing optional parameters on interface and bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
ealsur committed Sep 26, 2016
1 parent f27a6ed commit 6834647
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion HTTPDataCollectorAPI/HTTPDataCollectorAPI.xproj.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<projectUrl>https://github.com/ealsur/HTTPDataCollectorAPI</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Azure Log Analytics HTTP Data Collector API wrapper</description>
<releaseNotes>Initial release.</releaseNotes>
<releaseNotes>Interface optional parameters</releaseNotes>
<copyright>Copyright 2016. Ealsur.</copyright>
<tags>azure log analytics</tags>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions HTTPDataCollectorAPI/ICollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace HTTPDataCollectorAPI
/// </summary>
public interface ICollector
{
Task Collect(string LogType, string JsonPayload, string ApiVersion);
Task Collect(string LogType, object ObjectToSerialize, string ApiVersion);
Task Collect(string LogType, string JsonPayload, string ApiVersion = "2016-04-01");
Task Collect(string LogType, object ObjectToSerialize, string ApiVersion = "2016-04-01");
}
}
2 changes: 1 addition & 1 deletion HTTPDataCollectorAPI/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.0.1",
"description": "Azure Log Analytics HTTP DataCollector API wrapper",
"authors": [ "ealsur" ],
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions test/HTTPDataCollectorAPITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MySerializableClass{
[Fact]
public async Task SendingValidPayload()
{
var collector = new HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
ICollector collector = new HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
await collector.Collect("TestLogType", "{\"TestAttribute\":\"TestValue\"}");
}

Expand All @@ -27,7 +27,7 @@ public async Task SendingValidObject()
MyStringAttribute = "hello",
MyListAttribute = new List<string>(){"one","two"}
};
var collector = new HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
ICollector collector = new HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
await collector.Collect("TestLogType", anObject);
}
}
Expand Down

0 comments on commit 6834647

Please sign in to comment.