Skip to content

Commit 5a2d0d3

Browse files
committed
Added Note for obsolete methods
1 parent 9bd6cd4 commit 5a2d0d3

36 files changed

+100
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 'Obsolete Warning: PublishedSnapshot'
3+
---
4+
5+
{% hint style="warning" %}
6+
The following example uses `PublishedSnapshot`, which is obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article.
7+
{% endhint %}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 'Obsolete Warning: Snapshot and Published Cache'
3+
---
4+
5+
{% hint style="warning" %}
6+
The following example uses `Umbraco.Cms.Core.PublishedCache` and `IPublishedSnapshotAccessor` which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article.
7+
{% endhint %}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 'Obsolete Warning: Snapshot'
3+
---
4+
5+
{% hint style="warning" %}
6+
The following example uses `using Umbraco.Cms.Core.PublishedCache`, `IPublishedSnapshotAccessor`, and `PropertyCacheLevel.Snapshot`, which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article.
7+
{% endhint %}

15/umbraco-cms/customizing/property-editors/full-examples-value-converters.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Content Picker Value Converter Example
22

3+
{% include "../../.gitbook/includes/obsolete-warning-snapshot-publishedcache.md" %}
4+
35
{% code title="ContentPickerPropertyConverter.cs" %}
6+
47
```csharp
58
using Umbraco.Cms.Core;
69
using Umbraco.Cms.Core.Models.PublishedContent;
@@ -48,4 +51,5 @@ public class ContentPickerPropertyConverter : IPropertyValueConverter
4851
: null;
4952
}
5053
```
54+
5155
{% endcode %}

15/umbraco-cms/customizing/property-editors/property-value-converters.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ This is particularly useful for property values that contain references to other
113113

114114
#### `PropertyCacheLevel.Snapshot`
115115

116+
{% hint style="warning" %}
117+
`PropertyCacheLevel.Snapshot` is obsolete in Umbraco 15 and will be removed in a future version.
118+
{% endhint %}
119+
116120
The property value will only be cached for the duration of the current _snapshot_.
117121

118122
A snapshot represents a point in time. For example, a snapshot is created for every content request from the frontend. When accessing a property in a snapshot using this cache level, it gets converted, cached throughout the snapshot, and later cleared.
@@ -163,6 +167,8 @@ public object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPro
163167

164168
This method converts the Intermediate to an Object. The returned value is used by the `GetPropertyValue<T>` method of `IPublishedContent`.
165169

170+
{% include "../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
171+
166172
The below example converts the nodeId (converted to `Int` or `Udi` by _ConvertSourceToIntermediate_) into an 'IPublishedContent' object.
167173

168174
```csharp

15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get
9898

9999
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
100100

101+
{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
102+
101103
```csharp
102104
@inject IPublishedSnapshotAccessor _publishedSnapshotAccessor;
103105
@using Umbraco.Cms.Core.PublishedCache;

15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get
118118

119119
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
120120

121+
{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
122+
121123
```csharp
122124
@inject IPublishedSnapshotAccessor _publishedSnapshotAccessor;
123125
@using Umbraco.Cms.Core.PublishedCache;

15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get
248248

249249
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
250250

251+
{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
252+
251253
```csharp
252254
@inject IPublishedSnapshotAccessor _publishedSnapshotAccessor;
253255
@using Umbraco.Cms.Core.PublishedCache;

15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get
7474

7575
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
7676

77+
{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
78+
7779
```csharp
7880
@using Umbraco.Cms.Core.PublishedCache;
7981
@inject IPublishedSnapshotAccessor _publishedSnapshotAccessor;

15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get
7272

7373
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
7474

75+
{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %}
76+
7577
```csharp
7678
@inject IPublishedSnapshotAccessor _publishedSnapshotAccessor;
7779
@using Umbraco.Cms.Core.PublishedCache;

0 commit comments

Comments
 (0)