Skip to content

Commit 7eee6d2

Browse files
authored
Merge pull request #6656 from umbraco/obsolete-methods-note
Added note for Obsolete methods
2 parents 06542f2 + 440f492 commit 7eee6d2

39 files changed

+103
-4
lines changed

15/umbraco-cms/.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ title: 'Obsolete Warning: IPublishedSnapshotAccessor'
33
---
44

55
{% hint style="warning" %}
6-
The following example uses `IPublishedSnapshotAccessor`, 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.
6+
The following example uses `IPublishedSnapshotAccessor`, 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.
77
{% endhint %}
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 `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/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* [Advanced Techniques With Flexible Load Balancing](fundamentals/setup/server-setup/load-balancing/flexible-advanced.md)
4242
* [Logging With Load Balancing](fundamentals/setup/server-setup/load-balancing/logging.md)
4343
* [Backoffice](fundamentals/backoffice/README.md)
44+
* [Sections](fundamentals/backoffice/sections.md)
4445
* [Property Editors](fundamentals/backoffice/property-editors/README.md)
4546
* [Built-in Property Editors](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/README.md)
4647
* [Checkbox List](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md)

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;

0 commit comments

Comments
 (0)