Skip to content

Commit d7651c5

Browse files
committed
release 0.3.0
1 parent 58248fc commit d7651c5

19 files changed

Lines changed: 67 additions & 64 deletions

jsreport/NugetPack.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
call .\.nuget\nuget pack -sym jsreport.Client.nuspec -Symbols -Version %1 -OutputDirectory Packages
1+
call .\.nuget\nuget pack -sym jsreport.Embedded.nuspec -Symbols -Version %1 -OutputDirectory Packages

jsreport/jsreport.Client.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<package id="Microsoft.OData.Edm" version="6.10.0" targetFramework="net45" />
1111
<package id="Microsoft.Spatial" version="6.10.0" targetFramework="net45" />
1212
<package id="NUnit" version="2.6.3" targetFramework="net45" />
13-
<package id="Simple.OData.Client" version="4.2.1" targetFramework="net45" />
13+
<package id="Simple.OData.Client" version="4.3.0" targetFramework="net45" />
1414
<package id="System.Spatial" version="5.6.3" targetFramework="net45" />
1515
</packages>

jsreport/jsreport.Client.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<dependency id="Microsoft.Net.Http" version="2.2.18" />
1818
<dependency id="Microsoft.Bcl.Async" version="1.0.168"/>
1919
<dependency id="Newtonsoft.Json" version="6.0.1"/>
20-
<dependency id="Simple.OData.Client" version="[4.2.1]"/>
20+
<dependency id="Simple.OData.Client" version="[4.3.0]"/>
2121
</dependencies>
2222
</metadata>
2323
<files>

jsreport/jsreport.Client/Entities/Template.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ public Template()
1919
/// </summary>
2020
public string shortid { get; set; }
2121

22-
/// <summary>
23-
/// Used only when rendering in https://playground.jsreport.nets
24-
/// </summary>
25-
public int version { get; set; }
26-
2722
/// <summary>
2823
/// Content of report, most often this is html with javasript templating engines
2924
/// </summary>

jsreport/jsreport.Client/IReportingService.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ public interface IReportingService
3131
/// <exception cref="JsReportException"></exception>
3232
/// <returns>Report result promise</returns>
3333
Task<Report> RenderAsync(string templateShortid, string jsonData);
34-
35-
/// <summary>
36-
/// The simpliest rendering using template shortid and input data used with https://playground.jsreport.net
37-
/// </summary>
38-
/// <param name="templateShortid">template shortid can be taken from jsreport playground studio</param>
39-
/// <param name="data">any json serializable object</param>
40-
/// <param name="version">template version number taken from playground</param>
41-
/// <exception cref="JsReportException"></exception>
42-
/// <returns>Report result promise</returns>
43-
Task<Report> RenderAsync(string templateShortid, int version, object data);
4434

4535
/// <summary>
4636
/// Overload for more sophisticated rendering.

jsreport/jsreport.Client/JsReportWebHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ private static void ParseRequestHeaders(HttpContext context, HttpWebRequest requ
104104

105105
if (ReportingService.Username != null)
106106
{
107+
request.Headers.Remove("Authorization");
107108
request.Headers.Add("Authorization", "Basic " + System.Convert.ToBase64String(
108109
Encoding.UTF8.GetBytes(String.Format("{0}:{1}", ReportingService.Username, ReportingService.Password))));
109110
}

jsreport/jsreport.Client/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
// You can specify all the values or you can default the Build and Revision Numbers
2727
// by using the '*' as shown below:
2828
// [assembly: AssemblyVersion("1.0.*")]
29-
[assembly: AssemblyVersion("0.1.3.0")]
30-
[assembly: AssemblyFileVersion("0.1.3.0")]
29+
[assembly: AssemblyVersion("0.3.0.0")]
30+
[assembly: AssemblyFileVersion("0.3.0.0")]

jsreport/jsreport.Client/RenderRequest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ internal void CopyDynamicAttributes()
5353
if (template.phantom != null)
5454
dynamicTemplate.phantom = template.phantom;
5555

56-
dynamicTemplate.version = template.version;
57-
5856
if (template.additional != null)
5957
{
6058
foreach (var p in template.additional.GetType().GetRuntimeProperties())

jsreport/jsreport.Client/ReportingService.cs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,6 @@ public Task<Report> RenderAsync(string templateShortid, string jsonData)
8787
return RenderAsync(templateShortid, string.IsNullOrEmpty(jsonData) ? (object) null : JObject.Parse(jsonData));
8888
}
8989

90-
/// <summary>
91-
/// The simpliest rendering using template shortid and input data used with https://playground.jsreport.net
92-
/// </summary>
93-
/// <param name="templateShortid">template shortid can be taken from jsreport playground studio</param>
94-
/// <param name="data">any json serializable object</param>
95-
/// <param name="version">template version number taken from playground</param>
96-
/// <exception cref="JsReportException"></exception>
97-
/// <returns>Report result promise</returns>
98-
public async Task<Report> RenderAsync(string templateShortid, int version, object data)
99-
{
100-
return await RenderAsync(new RenderRequest()
101-
{
102-
template = new Template() { shortid = templateShortid, version = version},
103-
data = data
104-
}).ConfigureAwait(false);
105-
}
106-
10790
/// <summary>
10891
/// Overload for more sophisticated rendering.
10992
/// </summary>
@@ -241,13 +224,18 @@ public ODataClient CreateODataClient()
241224
public async Task SynchronizeTemplatesAsync()
242225
{
243226
await EnsureVersion();
227+
await SynchronizeTemplatesAsyncInner();
228+
}
229+
230+
private async Task SynchronizeTemplatesAsyncInner()
231+
{
244232
string path = ReportsDirectory;
245233

246234
ODataClient client = CreateODataClient();
247235

248236
await SynchronizeImagesAsync(client, path).ConfigureAwait(false);
249237
await SynchronizeSchemasAsync(client, path).ConfigureAwait(false);
250-
238+
251239
foreach (string reportFilePath in ValidateUniquenes(Directory.GetFiles(path, "*.jsrep", SearchOption.AllDirectories)))
252240
{
253241
string reportName = Path.GetFileNameWithoutExtension(reportFilePath);
@@ -270,7 +258,7 @@ public async Task SynchronizeTemplatesAsync()
270258
operation.recipe = reportDefinition.Recipe;
271259

272260
if (!string.IsNullOrEmpty(reportDefinition.SampleData))
273-
operation.data = new {shortid = reportDefinition.SampleData};
261+
operation.data = new { shortid = reportDefinition.SampleData };
274262

275263
operation.content = content;
276264
operation.helpers = helpers;
@@ -357,6 +345,7 @@ private async Task SynchronizeImagesAsync(ODataClient client, string path)
357345
dynamic operation = new ExpandoObject();
358346
operation.content = File.ReadAllBytes(imagePath);
359347
operation.shortid = imageName;
348+
operation.contentType = "image/png";
360349
operation.name = operation.shortid;
361350

362351
var image = await (client.For<Image>().Filter(x => x.name == imageName).FindEntryAsync()).ConfigureAwait(false);

jsreport/jsreport.Client/jsreport.Client.csproj

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1515
<RestorePackages>true</RestorePackages>
1616
<TargetFrameworkProfile />
17+
<NuGetPackageImportStamp>4a4505db</NuGetPackageImportStamp>
1718
</PropertyGroup>
1819
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1920
<DebugSymbols>true</DebugSymbols>
@@ -57,6 +58,23 @@
5758
<Compile Include="VSConfiguration\VSReportingConfiguration.cs" />
5859
</ItemGroup>
5960
<ItemGroup>
61+
<Reference Include="Microsoft.Data.Edm, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
62+
<SpecificVersion>False</SpecificVersion>
63+
<HintPath>..\packages\Microsoft.Data.Edm.5.6.3\lib\net40\Microsoft.Data.Edm.dll</HintPath>
64+
</Reference>
65+
<Reference Include="Microsoft.Data.OData, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<SpecificVersion>False</SpecificVersion>
67+
<HintPath>..\packages\Microsoft.Data.OData.5.6.3\lib\net40\Microsoft.Data.OData.dll</HintPath>
68+
</Reference>
69+
<Reference Include="Microsoft.OData.Core">
70+
<HintPath>..\packages\Microsoft.OData.Core.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Core.dll</HintPath>
71+
</Reference>
72+
<Reference Include="Microsoft.OData.Edm">
73+
<HintPath>..\packages\Microsoft.OData.Edm.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Edm.dll</HintPath>
74+
</Reference>
75+
<Reference Include="Microsoft.Spatial">
76+
<HintPath>..\packages\Microsoft.Spatial.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.Spatial.dll</HintPath>
77+
</Reference>
6078
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
6179
<SpecificVersion>False</SpecificVersion>
6280
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
@@ -72,26 +90,30 @@
7290
<Reference Include="Newtonsoft.Json">
7391
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
7492
</Reference>
75-
<Reference Include="Simple.OData.Client.Net40, Version=3.0.2.0, Culture=neutral, processorArchitecture=MSIL">
93+
<Reference Include="Simple.OData.Client.Net40, Version=4.3.0.0, Culture=neutral, processorArchitecture=MSIL">
7694
<SpecificVersion>False</SpecificVersion>
77-
<HintPath>..\packages\Simple.OData.Client.4.2.1\lib\net40\Simple.OData.Client.Net40.dll</HintPath>
95+
<HintPath>..\packages\Simple.OData.Client.4.3.0\lib\net40\Simple.OData.Client.Net40.dll</HintPath>
7896
</Reference>
7997
<Reference Include="System" />
8098
<Reference Include="System.Core" />
8199
<Reference Include="System.IO.Compression" />
82100
<Reference Include="System.IO.Compression.FileSystem" />
83101
<Reference Include="System.Net" />
84102
<Reference Include="System.Net.Http" />
85-
<Reference Include="System.Net.Http.Extensions, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
103+
<Reference Include="System.Net.Http.Extensions, Version=2.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
86104
<SpecificVersion>False</SpecificVersion>
87-
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
105+
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
88106
</Reference>
89-
<Reference Include="System.Net.Http.Primitives, Version=4.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
107+
<Reference Include="System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
90108
<SpecificVersion>False</SpecificVersion>
91-
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
109+
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
92110
</Reference>
93111
<Reference Include="System.Net.Http.WebRequest" />
94112
<Reference Include="System.Runtime.Serialization" />
113+
<Reference Include="System.Spatial, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
114+
<SpecificVersion>False</SpecificVersion>
115+
<HintPath>..\packages\System.Spatial.5.6.3\lib\net40\System.Spatial.dll</HintPath>
116+
</Reference>
95117
<Reference Include="System.Web" />
96118
<Reference Include="System.Xml.Linq" />
97119
<Reference Include="System.Data.DataSetExtensions" />
@@ -114,12 +136,9 @@
114136
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
115137
</PropertyGroup>
116138
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
139+
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
117140
</Target>
118-
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
119-
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
120-
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
121-
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
122-
</Target>
141+
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
123142
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
124143
Other similar extension points exist, see Microsoft.Common.targets.
125144
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)