Pārlūkot izejas kodu

Apply suggestions from code review

Egor Mozgovoy 3 gadi atpakaļ
vecāks
revīzija
30e6aa6cfc

+ 8 - 8
src/PixiEditor.ChangeableDocument/Changeables/Document.cs

@@ -58,7 +58,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
 
     /// <summary>
-    /// Check's if a member with the <paramref name="guid"/> exists
+    /// Checks if a member with the <paramref name="guid"/> exists
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <returns>True if the member can be found, otherwise false</returns>
@@ -69,7 +69,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
 
     /// <summary>
-    /// Check's if a member with the <paramref name="guid"/> exists and is of type <typeparamref name="T"/>
+    /// Checks if a member with the <paramref name="guid"/> exists and is of type <typeparamref name="T"/>
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <returns>True if the member can be found and is of type <typeparamref name="T"/>, otherwise false</returns>
@@ -80,14 +80,14 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
     
     /// <summary>
-    /// Find's the member with the <paramref name="guid"/> or throws a ArgumentException if not found
+    /// Finds the member with the <paramref name="guid"/> or throws a ArgumentException if not found
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <exception cref="ArgumentException">Thrown if the member could not be found</exception>
     public StructureMember FindMemberOrThrow(Guid guid) => FindMember(guid) ?? throw new ArgumentException($"Could not find member with guid '{guid}'");
 
     /// <summary>
-    /// Find's the member of type <typeparamref name="T"/> with the <paramref name="guid"/> or throws an exception
+    /// Finds the member of type <typeparamref name="T"/> with the <paramref name="guid"/> or throws an exception
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <exception cref="ArgumentException">Thrown if the member could not be found</exception>
@@ -95,7 +95,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     public T FindMemberOrThrow<T>(Guid guid) where T : StructureMember => (T)FindMember(guid)!;
 
     /// <summary>
-    /// Find's the member with the <paramref name="guid"/> or returns null if not found
+    /// Finds the member with the <paramref name="guid"/> or returns null if not found
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     public StructureMember? FindMember(Guid guid)
@@ -143,7 +143,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
 
     /// <summary>
-    /// Find's a member with the <paramref name="childGuid"/>  and it's parent, throws a ArgumentException if they can't be found
+    /// Finds a member with the <paramref name="childGuid"/>  and its parent, throws a ArgumentException if they can't be found
     /// </summary>
     /// <param name="childGuid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <returns>A value tuple consisting of child (<see cref="ValueTuple{T, T}.Item1"/>) and parent (<see cref="ValueTuple{T, T}.Item2"/>)</returns>
@@ -157,7 +157,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
 
     /// <summary>
-    /// Find's a member with the <paramref name="childGuid"/> and it's parent
+    /// Finds a member with the <paramref name="childGuid"/> and its parent
     /// </summary>
     /// <param name="childGuid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <returns>A value tuple consisting of child (<see cref="ValueTuple{T, T}.Item1"/>) and parent (<see cref="ValueTuple{T, T}.Item2"/>)<para>Child and parent can be null if not found!</para></returns>
@@ -173,7 +173,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
     }
 
     /// <summary>
-    /// Find's the path to the member with <paramref name="guid"/>, the first element will be the member
+    /// Finds the path to the member with <paramref name="guid"/>, the first element will be the member
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     public List<StructureMember> FindMemberPath(Guid guid)

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Folder.cs

@@ -13,7 +13,7 @@ internal class Folder : StructureMember, IReadOnlyFolder
     IReadOnlyList<IReadOnlyStructureMember> IReadOnlyFolder.Children => Children;
 
     /// <summary>
-    /// Creates a clone of the folder, it's mask and all of it's children
+    /// Creates a clone of the folder, its mask and all of its children
     /// </summary>
     internal override Folder Clone()
     {

+ 5 - 5
src/PixiEditor.ChangeableDocument/Changeables/Interfaces/IReadOnlyDocument.cs

@@ -28,7 +28,7 @@ public interface IReadOnlyDocument
     /// </summary>
     int HorizontalSymmetryAxisY { get; }
     /// <summary>
-    /// The position of the vertical symmetry axis (Mirrors top and bottom)
+    /// The position of the vertical symmetry axis (Mirrors left and right)
     /// </summary>
     int VerticalSymmetryAxisX { get; }
     /// <summary>
@@ -36,7 +36,7 @@ public interface IReadOnlyDocument
     /// </summary>
     void ForEveryReadonlyMember(Action<IReadOnlyStructureMember> action);
     /// <summary>
-    /// Find's the member with the <paramref name="guid"/> or returns null if not found
+    /// Finds the member with the <paramref name="guid"/> or returns null if not found
     /// </summary>
     /// <param name="guid">The <see cref="IReadOnlyStructureMember.GuidValue"/> of the member</param>
     IReadOnlyStructureMember? FindMember(Guid guid);
@@ -55,20 +55,20 @@ public interface IReadOnlyDocument
     /// <returns>True if the member could be found, otherwise false</returns>
     bool TryFindMember(Guid guid, [NotNullWhen(true)] out IReadOnlyStructureMember? member);
     /// <summary>
-    /// Find's the member with the <paramref name="guid"/> or throws a ArgumentException if not found
+    /// Finds the member with the <paramref name="guid"/> or throws a ArgumentException if not found
     /// </summary>
     /// <param name="guid">The <see cref="StructureMember.GuidValue"/> of the member</param>
     /// <exception cref="ArgumentException">Thrown if the member could not be found</exception>
     IReadOnlyStructureMember FindMemberOrThrow(Guid guid);
     /// <summary>
-    /// Find's a member with the <paramref name="childGuid"/>  and it's parent, throws a ArgumentException if they can't be found
+    /// Finds a member with the <paramref name="childGuid"/>  and its parent, throws a ArgumentException if they can't be found
     /// </summary>
     /// <param name="childGuid">The <see cref="IReadOnlyStructureMember.GuidValue"/> of the member</param>
     /// <returns>A value tuple consisting of child (<see cref="ValueTuple{T, T}.Item1"/>) and parent (<see cref="ValueTuple{T, T}.Item2"/>)</returns>
     /// <exception cref="ArgumentException">Thrown if the member and parent could not be found</exception>
     (IReadOnlyStructureMember, IReadOnlyFolder) FindChildAndParentOrThrow(Guid childGuid);
     /// <summary>
-    /// Find's the path to the member with <paramref name="guid"/>, the first element will be the member
+    /// Finds the path to the member with <paramref name="guid"/>, the first element will be the member
     /// </summary>
     /// <param name="guid">The <see cref="IReadOnlyStructureMember.GuidValue"/> of the member</param>
     IReadOnlyList<IReadOnlyStructureMember> FindMemberPath(Guid guid);

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Interfaces/IReadOnlyStructureMember.cs

@@ -9,7 +9,7 @@ public interface IReadOnlyStructureMember
     /// </summary>
     bool IsVisible { get; }
     /// <summary>
-    /// The opacity of the member (Randing from 0f to 1f)
+    /// The opacity of the member (Ranging from 0f to 1f)
     /// </summary>
     float Opacity { get; }
     bool ClipToMemberBelow { get; }

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Layer.cs

@@ -29,7 +29,7 @@ internal class Layer : StructureMember, IReadOnlyLayer
     }
 
     /// <summary>
-    /// Creates a clone of the layer, it's image and it's mask
+    /// Creates a clone of the layer, its image and its mask
     /// </summary>
     /// <returns></returns>
     internal override Layer Clone()