Skip to content

Commit

Permalink
Upgrade to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jun 1, 2022
1 parent 68fc8ef commit 0db7196
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/AutoDataQueryServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public T GetJson<T>(string route)
{
try {
return "https://api.github.com".CombineWith(route)
.GetJsonFromUrl(requestFilter: req => req.UserAgent = nameof(AutoDataQueryServices))
.GetJsonFromUrl(requestFilter: req => req.With(c => c.UserAgent = nameof(AutoDataQueryServices)))
.FromJson<T>();
} catch(Exception) { return default(T); }
}
Expand Down
4 changes: 2 additions & 2 deletions src/GitHubMarkdownFilters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ public async Task githubMarkdown(ScriptScopeContext scope, string markdownPath)

var htmlBytes = RepositoryContext == null
? await ApiBaseUrl.CombineWith("markdown", "raw")
.PostBytesToUrlAsync(bytes, contentType:MimeTypes.PlainText, requestFilter:x => x.UserAgent = "#Script")
.PostBytesToUrlAsync(bytes, contentType:MimeTypes.PlainText, requestFilter:x => x.With(c => c.UserAgent = "#Script"))
: await ApiBaseUrl.CombineWith("markdown")
.PostBytesToUrlAsync(new Dictionary<string,string> { {"text", bytes.FromUtf8Bytes() }, {"mode", Mode}, {"context", RepositoryContext} }.ToJson().ToUtf8Bytes(),
contentType:MimeTypes.Json, requestFilter:x => x.UserAgent = "#Script");
contentType:MimeTypes.Json, requestFilter:x => x.With(c => c.UserAgent = "#Script"));

byte[] wrappedBytes = null;

Expand Down
20 changes: 10 additions & 10 deletions src/SharpScript.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<PackageReference Include="System.IO.FileSystem.DriveInfo" Version="4.3.*" />
<PackageReference Include="NUglify" Version="1.5.13" />

<PackageReference Include="ServiceStack" Version="5.*" />
<PackageReference Include="ServiceStack.Interfaces" Version="5.*" />
<PackageReference Include="ServiceStack.Text" Version="5.*" />
<PackageReference Include="ServiceStack.Client" Version="5.*" />
<PackageReference Include="ServiceStack.Common" Version="5.*" />
<PackageReference Include="ServiceStack.Redis" Version="5.*" />
<PackageReference Include="ServiceStack.OrmLite" Version="5.*" />
<PackageReference Include="ServiceStack.OrmLite.Sqlite" Version="5.*" />
<PackageReference Include="ServiceStack.Server" Version="5.*" />
<PackageReference Include="ServiceStack.Api.OpenApi" Version="5.*" />
<PackageReference Include="ServiceStack" Version="6.*" />
<PackageReference Include="ServiceStack.Interfaces" Version="6.*" />
<PackageReference Include="ServiceStack.Text" Version="6.*" />
<PackageReference Include="ServiceStack.Client" Version="6.*" />
<PackageReference Include="ServiceStack.Common" Version="6.*" />
<PackageReference Include="ServiceStack.Redis" Version="6.*" />
<PackageReference Include="ServiceStack.OrmLite" Version="6.*" />
<PackageReference Include="ServiceStack.OrmLite.Sqlite" Version="6.*" />
<PackageReference Include="ServiceStack.Server" Version="6.*" />
<PackageReference Include="ServiceStack.Api.OpenApi" Version="6.*" />
</ItemGroup>

</Project>

0 comments on commit 0db7196

Please sign in to comment.