You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG000.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
## Explanation
7
7
8
8
Adding @Stride.Core.DataMemberAttribute and @Stride.Core.DataMemberIgnoreAttribute to the same member is not supported. This would be a contradiction.
9
-
It would mean the Serializer should serialize the member and ignore it at the same time. The @Stride.Updater.DataMemberUpdatableAttribute makes the combination valid again as it negates the @Stride.Core.DataMemberIgnoreAttribute for the binary Serializer.
9
+
It would mean the serializer should serialize the member and ignore it at the same time. The @Stride.Updater.DataMemberUpdatableAttribute makes the combination valid again as it negates the @Stride.Core.DataMemberIgnoreAttribute for the binary serializer.
10
10
11
11
## Example: Invalid cases
12
12
@@ -49,8 +49,8 @@ public class STRDIAG000
49
49
## Solution
50
50
51
51
> To resolve the warning, pick either the @Stride.Core.DataMemberAttribute or the @Stride.Core.DataMemberIgnoreAttribute.
52
-
If the `YamlSerializer` and the Editor should ignore the member but the binary Serializer not, then add the @Stride.Core.DataMemberIgnoreAttribute.
52
+
If the `YamlSerializer` and the Editor should ignore the member but the binary serializer not, then add the @Stride.Core.DataMemberIgnoreAttribute.
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG002.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,8 @@
5
5
6
6
## Explanation
7
7
8
-
The Content Mode mutates the object which is currently in the member.
9
-
As this is not possible with the current Serializers, only mutable Types are supported for Content Mode.
10
-
Immutable types in this context are none reference types and string.
8
+
The [DataMemberMode.Content](xref:Stride.Core.DataMemberMode) mutates the object which is currently in the member.
9
+
As this is not possible with the current serializers, only mutable types are supported for `DataMemberMode.Content`. Immutable types in this context are none reference types and string.
11
10
12
11
## Example
13
12
@@ -19,7 +18,7 @@ using Stride.Core;
19
18
publicclassSTRDIAG002
20
19
{
21
20
[DataMember(DataMemberMode.Content)]
22
-
publicintValue { get; set;}
21
+
publicintValue { get; set;}
23
22
24
23
[DataMember(DataMemberMode.Content)]
25
24
publicstringValue;
@@ -28,4 +27,4 @@ public class STRDIAG002
28
27
29
28
## Solution
30
29
31
-
To resolve the warning, pick either a reference type for the member or use `DataMemberMode.Assign` for Immutable types.
30
+
To resolve the warning, pick either a reference type for the member or use `DataMemberMode.Assign` for Immutable types.
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG003.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
1
# Diagnostics Warning STRDIAG003
2
2
3
-
> The member '{0}' with `[DataMember]` is not accesssible to the serializer. Only public/internal/internal > protected visibility is supported, when the `[DataMember]` attribute is applied.
3
+
> The member '{0}' with `[DataMember]` is not accessible to the serializer. Only public/internal/internal > protected visibility is supported, when the `[DataMember]` attribute is applied.
4
4
5
5
## Explanation
6
6
7
-
The Serialization concept in Stride expects public/internal/internal protected visibility of properties.
8
-
Other Accessibility won't be considered for Serialization.
9
-
To count internal/internal protected as visible to the Editor the @Stride.Core.DataMemberAttribute has to be applied, else it's considered as not visible.
7
+
The serialization concept in Stride expects `public`/`internal`/`internal protected` visibility of properties. Other accessibility won't be considered for serialization.
8
+
To count `internal`/`internal protected` as visible to the Editor the @Stride.Core.DataMemberAttribute has to be applied, else it's considered as not visible.
10
9
11
10
## Example
12
11
@@ -18,7 +17,7 @@ using Stride.Core;
18
17
publicclassSTRDIAG003
19
18
{
20
19
[DataMember]
21
-
privateintValue { get; set;}
20
+
privateintValue { get; set;}
22
21
23
22
[DataMember]
24
23
protectedstringValue;
@@ -30,4 +29,4 @@ public class STRDIAG003
30
29
31
30
## Solution
32
31
33
-
To resolve the warning, increase the Accessibility to public/internal/internal protected of the member or remove the @Stride.Core.DataMemberAttribute Attribute.
32
+
To resolve the warning, increase the Accessibility to `public`/`internal`/`internal protected` of the member or remove the @Stride.Core.DataMemberAttribute Attribute.
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG004.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@
5
5
6
6
## Explanation
7
7
8
-
All Serializers need a getter on a property to be able to get the content of the property.
9
-
This is required for all Serializers in Stride.
10
-
Non existent getters will result in error message 1.
11
-
Non visible getters will result in error message 2.
8
+
All serializers need a getter on a property to be able to get the content of the property.
9
+
This is required for all serializers in Stride.
10
+
-Non existent getters will result in error message 1.
11
+
-Non visible getters will result in error message 2.
12
12
13
13
## Example
14
14
@@ -34,8 +34,8 @@ public class STRDIAG004
34
34
```
35
35
36
36
> [!WARNING]
37
-
> There is an edge case with internal/internal protected, it will count as non visible when the @Stride.Core.DataMemberAttribute isn't applied.
38
-
> But when the Attribute is applied then the getter counts as visible and therfore is correct.
37
+
> There is an edge case with `internal`/`internal protected`, it will count as non visible when the @Stride.Core.DataMemberAttribute isn't applied.
38
+
> But when the attribute is applied then the getter counts as visible and therefore is correct.
39
39
40
40
```csharp
41
41
// STRDIAG000.cs
@@ -44,10 +44,10 @@ using Stride.Core;
44
44
publicclassSTRDIAG004
45
45
{
46
46
// will throw STRDIAG004
47
-
publicintValue { internalget; set;}
47
+
publicintValue { internalget; set;}
48
48
49
49
// will throw STRDIAG004
50
-
publicintValue { internalprotectedget; set;}
50
+
publicintValue { internalprotectedget; set;}
51
51
52
52
// won't throw STRDIAG004
53
53
[DataMember]
@@ -61,6 +61,6 @@ public class STRDIAG004
61
61
62
62
## Solution
63
63
64
-
To resolve the warning 1, add a getter to the property with a public/internal/internal protected Accessibility or remove the @Stride.Core.DataMemberAttribute .
64
+
To resolve the warning 1, add a getter to the property with a `public`/`internal`/`internal protected` accessibility or remove the @Stride.Core.DataMemberAttribute .
65
65
66
-
To resolve the warning 2, increase the Accessibility of the property getter to public/internal/internal protected Accessibility or remove the @Stride.Core.DataMemberAttribute .
66
+
To resolve the warning 2, increase the accessibility of the property getter to `public`/`internal`/`internal protected` accessibility or remove the @Stride.Core.DataMemberAttribute .
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG006.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
# Diagnostics Warning STRDIAG006
2
2
3
-
> Invalid DataMembermode for the specified `[DataMember]` member '{0}'. A public/internal/internal protected setter is required for 'DataMemberMode.Assign'.
3
+
> Invalid DataMemberMode for the specified `[DataMember]` member '{0}'. A public/internal/internal protected setter is required for 'DataMemberMode.Assign'.
4
4
5
5
## Explanation
6
6
7
-
The @Stride.Core.DataMemberMode.Assign let's the Serializers create new objects and sets them into the target property.
8
-
The Property needs an accessible/visible setter.
7
+
The @Stride.Core.DataMemberMode.Assign let's the serializers create new objects and sets them into the target property. The Property needs an accessible/visible setter.
9
8
10
9
## Example: Invalid Cases
11
10
@@ -18,6 +17,7 @@ public class STRDIAG006
18
17
{
19
18
// non existent setters count as non visible
20
19
[DataMember(DataMemberMode.Assign)]
20
+
[DataMember(DataMemberMode.Assign)]
21
21
publicintProperty1 { get; }
22
22
23
23
[DataMember(DataMemberMode.Assign)]
@@ -31,11 +31,11 @@ public class STRDIAG006
31
31
}
32
32
```
33
33
34
-
## Example: Special Case internal
34
+
## Example: Special Case `internal`
35
35
36
36
> [!IMPORTANT]
37
37
> To explicitly set the `DataMemberMode.Assign` the @Stride.Core.DataMemberAttribute has to be applied.
38
-
> Internal visibility counts then as visible for the Serializers and becomes valid.
38
+
> Internal visibility counts then as visible for the serializers and becomes valid.
39
39
40
40
```csharp
41
41
usingStride.Core;
@@ -53,8 +53,7 @@ public class STRDIAG006
53
53
54
54
## Solution
55
55
56
-
To resolve the warning, increase the accessibility of the Properties set to pulic/internal.
57
-
Or remove the explicit `DataMemberMode.Assign`, this can result in the `DataMemberMode.Content`, if the Property is a non valuetype/string type.
56
+
To resolve the warning, increase the accessibility of the properties set to `public`/`internal`. Or remove the explicit `DataMemberMode.Assign`, this can result in the `DataMemberMode.Content`, if the property is a non valuetype/string type.
Copy file name to clipboardExpand all lines: en/diagnostics/STRDIAG007.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,7 @@
4
4
5
5
## Explanation
6
6
7
-
Delegates can't be serialized by the Serializers in Stride.
8
-
So the @Stride.Core.DataMemberAttribute is always invalid on a delegate member in a type.
7
+
Delegates can't be serialized by the serializers in Stride. Therefore, the @Stride.Core.DataMemberAttribute is always invalid when applied to a delegate member in a type.
9
8
10
9
## Example: Invalid Cases
11
10
@@ -26,7 +25,7 @@ public class STRDIAG007
26
25
27
26
## Solution
28
27
29
-
To resolve the warning, remove the @Stride.Core.DataMemberAttribute.
28
+
To resolve the warning, remove the @Stride.Core.DataMemberAttribute.
0 commit comments