Browse Source

Merge pull request #1 from VaclavElias/pr-165-small-updates

feat: Links added and minor improvements
IXLLEGACYIXL 2 years ago
parent
commit
bf4fbe5999
2 changed files with 21 additions and 16 deletions
  1. 14 12
      en/diagnostics/STRDIAG000.md
  2. 7 4
      en/diagnostics/STRDIAG001.md

+ 14 - 12
en/diagnostics/STRDIAG000.md

@@ -1,14 +1,12 @@
 # Diagnostics Warning STRDIAG000
 
-There is an Attribute Contradiction on '{0}' Member. \[DataMemberIgnore] Attribute on a \[DataMember] is not supported.
-Except if it has also \[DataMemberUpdatable] Attribute.
+> There is an Attribute Contradiction on '{0}' Member. `[DataMemberIgnore]` Attribute on a `[DataMember]` is not supported.
+Except if it has also `[DataMemberUpdatable]` Attribute.
 
 ## Explanation
 
-Adding [DataMember] and [DataMemberIgnore] to the same member is not supported.
-This would be a contradiction.
-It would mean the Serializer should serialize the member and ignore it at the same time.
-The DataMemberUpdatable Attribute makes the combination valid again as it negates the DataMemberIgnore for the binary Serializer.
+Adding `[DataMember]` and `[DataMemberIgnore]` to the same member is not supported. This would be a contradiction.
+It would mean the Serializer should serialize the member and ignore it at the same time. The `DataMemberUpdatable` attribute makes the combination valid again as it negates the `DataMemberIgnore` for the binary Serializer.
 
 ## Example
 
@@ -22,7 +20,7 @@ public class STRDIAG000
 {
     [DataMember]
     [DataMemberIgnore]
-    public int Value { get; set;}
+    public int Value { get; set; }
 
     [DataMember]
     [DataMemberIgnore]
@@ -30,8 +28,8 @@ public class STRDIAG000
 }
 ```
 
-There is a special case if the Stride.Updater.DataMemberUpdatableAttribute is applied.
-This Attribute negates the Stride.Core.DataMemberIgnoreAttribute for the binary Serializer, so it becomes valid again.
+There is a special case if the @Stride.Updater.DataMemberUpdatableAttribute is applied.
+This Attribute negates the @Stride.Core.DataMemberIgnoreAttribute for the binary Serializer, so it becomes valid again.
 
 ```csharp
 using Stride.Core;
@@ -41,11 +39,15 @@ public class STRDIAG000
     [DataMember]
     [DataMemberIgnore]
     [DataMemberUpdatable]
-    public int Value { get; set;}
+    public int Value { get; set; }
 }
 ```
 
 ## Solution
 
-To resolve the warning, pick either the Stride.Core.DataMemberAttribute or the Stride.Core.DataMemberIgnoreAttribute.
-If the YamlSerializer and the Editor should ignore the member but the binary Serializer not, then add the Stride.Core.DataMemberIgnoreAttribute.
+To resolve the warning, pick either the @Stride.Core.DataMemberAttribute or the @Stride.Core.DataMemberIgnoreAttribute.
+If the `YamlSerializer` and the Editor should ignore the member but the binary Serializer not, then add the @Stride.Core.DataMemberIgnoreAttribute.
+
+## References
+
+- [Serialisation](../manual/scripts/serialization.md)

+ 7 - 4
en/diagnostics/STRDIAG001.md

@@ -1,11 +1,10 @@
 # Diagnostics Warning STRDIAG001
 
-The \[DataContract] is not valid for the type '{0}'. Expected is a public/internal Accessor.
+> The `[DataContract]` is not valid for the type '{0}'. Expected is a public/internal Accessor.
 
 ## Explanation
 
-The DataContract Attribute can only be applied to public/internal type.
-Any Access that is lower than that will cause STRDIAG001 on the target type.
+The `[DataContract]` attribute can only be applied to public/internal type. Any Access that is lower than that will cause STRDIAG001 on the target type.
 
 ## Example: private inner class
 
@@ -18,7 +17,7 @@ using Stride.Core;
 public class STRDIAG001
 {
     [DataContract]
-    private class InnerClass{ }
+    private class InnerClass { }
 }
 ```
 
@@ -35,3 +34,7 @@ file class STRDIAG001
 ## Solution
 
 To resolve the warning, increase the accessibility of the type to pulic/internal or remove the DataContractAttribute.
+
+## References
+
+- [Serialisation](../manual/scripts/serialization.md)