Skip to content

Commit 2851857

Browse files
committed
Asset class implements IEmbeddedObject
1 parent 97f7978 commit 2851857

8 files changed

Lines changed: 49 additions & 15 deletions

File tree

Contentstack.AspNetCore/Contentstack.AspNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Copyright>Copyright (c) 2012-2020 Contentstack (http://app.contentstack.com). All Rights Reserved</Copyright>
1313
<PackageProjectUrl>https://github.com/contentstack/contentstack-dotnet</PackageProjectUrl>
1414
<PackageTags>v2.5.0</PackageTags>
15-
<ReleaseVersion>2.6.0</ReleaseVersion>
15+
<ReleaseVersion>2.6.1</ReleaseVersion>
1616
</PropertyGroup>
1717

1818
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

Contentstack.Core.Tests/Contentstack.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netcoreapp2.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
7-
<ReleaseVersion>2.6.0</ReleaseVersion>
7+
<ReleaseVersion>2.6.1</ReleaseVersion>
88
</PropertyGroup>
99

1010
<ItemGroup>

Contentstack.Core.Tests/QueryTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ public async Task IncludeEmbeddedItems()
11831183
ContentType contenttype = client.ContentType(source);
11841184
Query query = contenttype.Query();
11851185
query.includeEmbeddedItems();
1186-
var result = await query.Find<SourceModelIncludeRef>();
1186+
var result = await query.Find<SourceModel>();
11871187
if (result == null && result.Items.Count() == 0)
11881188
{
11891189
Assert.False(true, "Query.Exec is not match with expected result.");

Contentstack.Core/Contentstack.Core.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<PackageId>contentstack.csharp</PackageId>
66
<Authors>Contentstack</Authors>
77
<Description>.NET SDK for the Contentstack Content Delivery API.</Description>
8-
<PackageVersion>2.6.0</PackageVersion>
8+
<PackageVersion>2.6.1</PackageVersion>
99
<Owners>Contentstack</Owners>
1010
<PackageReleaseNotes>Embedded Objects fearure added</PackageReleaseNotes>
11-
<Copyright>Copyright © 2012-2020 Contentstack. All Rights Reserved</Copyright>
11+
<Copyright>Copyright © 2012-2021 Contentstack. All Rights Reserved</Copyright>
1212
<PackOnBuild>true</PackOnBuild>
13-
<PackageTags>v2.6.0</PackageTags>
13+
<PackageTags>v2.6.1</PackageTags>
1414
<PackageProjectUrl>https://github.com/contentstack/contentstack-dotnet</PackageProjectUrl>
15-
<PackageLicenseUrl>https://github.com/contentstack/contentstack-dotnet/blob/master/LICENSE</PackageLicenseUrl>
16-
<ReleaseVersion>2.6.0</ReleaseVersion>
15+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
16+
<ReleaseVersion>2.6.1</ReleaseVersion>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -31,6 +31,9 @@
3131
<PackageReference Include="Markdig" Version="0.22.0" />
3232
<PackageReference Include="contentstack.utils" Version="1.0.0" />
3333
</ItemGroup>
34+
<ItemGroup>
35+
<None Include="LICENSE.txt" Pack="true" PackagePath="LICENSE.txt" />
36+
</ItemGroup>
3437
<ItemGroup>
3538
<Folder Include="Internals\" />
3639
<Folder Include="Models\" />

Contentstack.Core/LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2012-2021 Contentstack (http://app.contentstack.com). All Rights Reserved
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Contentstack.Core/Models/Asset.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Threading.Tasks;
77
using Contentstack.Core.Configuration;
88
using Contentstack.Core.Internals;
9+
using Contentstack.Utils.Interfaces;
910
using Newtonsoft.Json;
1011
using Newtonsoft.Json.Linq;
1112

@@ -14,7 +15,7 @@ namespace Contentstack.Core.Models
1415
/// <summary>
1516
/// Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use
1617
/// </summary>
17-
public class Asset
18+
public class Asset : IEmbeddedObject
1819
{
1920
#region Internal & Private Properties
2021
private Dictionary<string, object> _ObjectAttributes = new Dictionary<string, object>();
@@ -90,10 +91,16 @@ public string Url
9091
}
9192

9293
/// <summary>
93-
/// This is Entry Uid of an entry.
94+
/// This is Asset Uid of an Asset.
9495
/// </summary>
9596
public string Uid { get; set; }
9697

98+
/// <summary>
99+
/// This is Asset type uid.
100+
/// </summary>
101+
[JsonProperty(propertyName: "_content_type_uid")]
102+
public string ContentTypeUid { get; set; }
103+
97104
/// <summary>
98105
/// The size of the file in bytes.
99106
/// </summary>
@@ -103,15 +110,18 @@ public string Url
103110
/// <summary>
104111
/// The original name of the file.
105112
/// </summary>
106-
public string FileName { get; set; }
113+
public string FileName { get; set; }
107114

115+
/// <summary>
116+
/// This is Asset description.
117+
/// </summary>
108118
public string Description { get; set; }
109119

110120
/// <summary>
111121
/// Set array of Tags
112122
/// </summary>
113-
public Object[] Tags { get; set; }
114-
123+
public Object[] Tags { get; set; }
124+
115125
#region Internal Constructors
116126
internal Asset(ContentstackClient stack, string uid)
117127
{

Contentstack.Net.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,6 @@ Global
132132
$0.XmlFormattingPolicy = $9
133133
$9.scope = application/xml
134134
$0.StandardHeader = $10
135-
version = 2.6.0
135+
version = 2.6.1
136136
EndGlobalSection
137137
EndGlobal

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2012-2020 Contentstack (http://app.contentstack.com). All Rights Reserved
3+
Copyright (c) 2012-2021 Contentstack (http://app.contentstack.com). All Rights Reserved
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)