Skip to content

Commit f8f988a

Browse files
author
José Miguel Sánchez Fernández
authored
Merge pull request #3 from VisualStudioEX3/feature/fixed-documentation-in-code
Feature/fixed documentation in code
2 parents 2acb8d0 + af52173 commit f8f988a

File tree

6 files changed

+75
-72
lines changed

6 files changed

+75
-72
lines changed

DIV2.Format.Exporter/ColorPalette.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public struct Color : ISerializableAsset
6969

7070
#region Properties
7171
/// <summary>
72-
/// Get or set the component color value.
72+
/// Gets or sets the component color value.
7373
/// </summary>
7474
/// <param name="index">Index of the component.</param>
7575
/// <returns>Returns the component color value.</returns>
@@ -151,7 +151,7 @@ public byte this[int index]
151151
/// </summary>
152152
/// <param name="a">Left <see cref="Color"/> value to compare.</param>
153153
/// <param name="b">Right <see cref="Color"/> value to compare.</param>
154-
/// <returns>Returns true if the left value are less or equal than the right value.</returns>
154+
/// <returns>Returns <see langword="true"/> if the left value are less or equal than the right value.</returns>
155155
public static bool operator <=(Color a, Color b)
156156
{
157157
return (int)a <= (int)b;
@@ -246,7 +246,7 @@ public Color(BinaryReader stream)
246246

247247
#region Methods & Functions
248248
/// <summary>
249-
/// Serialize this instance to binary format.
249+
/// Serializes this instance to binary format.
250250
/// </summary>
251251
/// <returns>Returns a <see cref="byte"/> array with the serialized data.</returns>
252252
public byte[] Serialize()
@@ -255,7 +255,7 @@ public byte[] Serialize()
255255
}
256256

257257
/// <summary>
258-
/// Write this instance data in a <see cref="BinaryWriter"/> instance.
258+
/// Writes this instance data in a <see cref="BinaryWriter"/> instance.
259259
/// </summary>
260260
/// <param name="stream"><see cref="BinaryWriter"/> instance.</param>
261261
public void Write(BinaryWriter stream)
@@ -327,7 +327,7 @@ internal Vector3 Step()
327327
/// <summary>
328328
/// Is a valid DAC color value?
329329
/// </summary>
330-
/// <returns>Returns true if the RGB components are into the DAC range values [0..63].</returns>
330+
/// <returns>Returns <see langword="true"/> if the RGB components are into the DAC range values [0..63].</returns>
331331
public bool IsDAC()
332332
{
333333
return this.red.IsClamped(0, MAX_DAC_VALUE) ||
@@ -348,7 +348,7 @@ public override bool Equals(object obj)
348348
}
349349

350350
/// <summary>
351-
/// Generate a hash code for this instance.
351+
/// Generates a hash code for this instance.
352352
/// </summary>
353353
/// <returns>Returns an <see cref="int"/> value compose with the RGB values for the first 3 bytes and a zero for fourth byte.</returns>
354354
public override int GetHashCode()
@@ -439,7 +439,7 @@ public sealed class ColorPalette : ISerializableAsset, IEnumerable<Color>
439439

440440
#region Properties
441441
/// <summary>
442-
/// Get or set a <see cref="Color"/> value in DAC format [0..63].
442+
/// Gets or sets a <see cref="Color"/> value in DAC format [0..63].
443443
/// </summary>
444444
/// <param name="index">Index in palette.</param>
445445
/// <returns>Returns the <see cref="Color"/> value.</returns>
@@ -556,7 +556,7 @@ public ColorPalette(BinaryReader stream)
556556

557557
#region Methods & Functions
558558
/// <summary>
559-
/// Serialize this instance to binary format.
559+
/// Serializes this instance to binary format.
560560
/// </summary>
561561
/// <returns>Returns a <see cref="byte"/> array with the serialized data.</returns>
562562
public byte[] Serialize()
@@ -571,7 +571,7 @@ public byte[] Serialize()
571571
}
572572

573573
/// <summary>
574-
/// Write this instance data in a <see cref="BinaryWriter"/> instance.
574+
/// Writes this instance data in a <see cref="BinaryWriter"/> instance.
575575
/// </summary>
576576
/// <param name="stream"><see cref="BinaryWriter"/> instance.</param>
577577
public void Write(BinaryWriter stream)
@@ -651,7 +651,7 @@ public override bool Equals(object obj)
651651
}
652652

653653
/// <summary>
654-
/// Generate a hash code for this instance.
654+
/// Generates a hash code for this instance.
655655
/// </summary>
656656
/// <returns>Returns an <see cref="int"/> SHA256 hash code from the MD5 hash created by the binary serialized data of this instance.</returns>
657657
public override int GetHashCode()

DIV2.Format.Exporter/ColorRange.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public enum RangeTypes : byte
157157

158158
#region Properties
159159
/// <summary>
160-
/// Get or set the range entry value.
160+
/// Gets or sets the range entry value.
161161
/// </summary>
162162
/// <param name="index">Index of the entry.</param>
163163
/// <returns>Returns the range entry value.</returns>
@@ -267,7 +267,7 @@ public ColorRange(byte[] buffer)
267267

268268
#region Methods & Functions
269269
/// <summary>
270-
/// Serialize this instance to binary format.
270+
/// Serializes this instance to binary format.
271271
/// </summary>
272272
/// <returns>Returns a <see cref="byte"/> array with the serialized data.</returns>
273273
public byte[] Serialize()
@@ -285,7 +285,7 @@ public byte[] Serialize()
285285
}
286286

287287
/// <summary>
288-
/// Write this instance data in a <see cref="BinaryWriter"/> instance.
288+
/// Writes this instance data in a <see cref="BinaryWriter"/> instance.
289289
/// </summary>
290290
/// <param name="stream"><see cref="BinaryWriter"/> instance.</param>
291291
public void Write(BinaryWriter stream)
@@ -324,7 +324,7 @@ public override bool Equals(object obj)
324324
}
325325

326326
/// <summary>
327-
/// Generate a hash code for this instance.
327+
/// Generates a hash code for this instance.
328328
/// </summary>
329329
/// <returns>Returns an <see cref="int"/> SHA256 hash code from the MD5 hash created by the binary serialized data of this instance.</returns>
330330
public override int GetHashCode()

DIV2.Format.Exporter/ColorRangeTable.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public sealed class ColorRangeTable : ISerializableAsset, IEnumerable<ColorRange
7777

7878
#region Properties
7979
/// <summary>
80-
/// Get or set the <see cref="ColorRange"/> value.
80+
/// Gets or sets the <see cref="ColorRange"/> value.
8181
/// </summary>
8282
/// <param name="index">Index of the range.</param>
8383
/// <returns>Returns the <see cref="ColorRange"/> value.</returns>
@@ -158,7 +158,7 @@ public ColorRangeTable(byte[] buffer)
158158

159159
#region Methods & Functions
160160
/// <summary>
161-
/// Serialize this instance to binary format.
161+
/// Serializes this instance to binary format.
162162
/// </summary>
163163
/// <returns>Returns a <see cref="byte"/> array with the serialized data.</returns>
164164
public byte[] Serialize()
@@ -173,7 +173,7 @@ public byte[] Serialize()
173173
}
174174

175175
/// <summary>
176-
/// Write this instance data in a <see cref="BinaryWriter"/> instance.
176+
/// Writes this instance data in a <see cref="BinaryWriter"/> instance.
177177
/// </summary>
178178
/// <param name="stream"><see cref="BinaryWriter"/> instance.</param>
179179
public void Write(BinaryWriter stream)
@@ -212,7 +212,7 @@ public override bool Equals(object obj)
212212
}
213213

214214
/// <summary>
215-
/// Generate a hash code for this instance.
215+
/// Generates a hash code for this instance.
216216
/// </summary>
217217
/// <returns>Returns an <see cref="int"/> SHA256 hash code from the MD5 hash created by the binary serialized data of this instance.</returns>
218218
public override int GetHashCode()

DIV2.Format.Exporter/FPG.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public sealed class FPG : IAssetFile, IEnumerable<MAP>
219219
/// </summary>
220220
public int Count => this._registers.Count;
221221
/// <summary>
222-
/// Get a <see cref="MAP"/> instance.
222+
/// Gets a <see cref="MAP"/> instance.
223223
/// </summary>
224224
/// <param name="index">Index of the <see cref="MAP"/> in the <see cref="FPG"/>.</param>
225225
/// <returns>Returns the <see cref="MAP"/> instance.</returns>
@@ -385,7 +385,7 @@ public void Add(MAP map, string filename = "")
385385
/// Determines whether a <see cref="MAP"/> is in this instance.
386386
/// </summary>
387387
/// <param name="map">The <see cref="MAP"/> to locate in this instance.</param>
388-
/// <returns>Returns true if the <see cref="MAP"/> exists.</returns>
388+
/// <returns>Returns <see langword="true"/> if the <see cref="MAP"/> exists.</returns>
389389
public bool Contains(MAP map)
390390
{
391391
foreach (MAP item in this)
@@ -399,7 +399,7 @@ public bool Contains(MAP map)
399399
/// Determines whether a <see cref="MAP"/> with a graphic identifier is in this instance.
400400
/// </summary>
401401
/// <param name="graphId"><see cref="MAP"/> graphic identifier to search.</param>
402-
/// <returns>Returns true if a <see cref="MAP"/> graphic identifier exists.</returns>
402+
/// <returns>Returns <see langword="true"/> if a <see cref="MAP"/> graphic identifier exists.</returns>
403403
public bool Contains(int graphId)
404404
{
405405
foreach (MAP map in this)
@@ -471,7 +471,7 @@ public void Clear()
471471
}
472472

473473
/// <summary>
474-
/// Gets the associate filename value for this <see cref="MAP"/> in the <see cref="FPG"/>.
474+
/// Gets the associated filename value for this <see cref="MAP"/> in the <see cref="FPG"/>.
475475
/// </summary>
476476
/// <param name="map"><see cref="MAP"/> instance to find.</param>
477477
/// <returns>Returns the <see cref="MAP"/> filename value.</returns>
@@ -485,7 +485,7 @@ public string GetFilename(MAP map)
485485
}
486486

487487
/// <summary>
488-
/// Gets the associate filename value for this <see cref="MAP"/> in the <see cref="FPG"/>.
488+
/// Gets the associated filename value for this <see cref="MAP"/> in the <see cref="FPG"/>.
489489
/// </summary>
490490
/// <param name="index">The index of the <see cref="MAP"/> instance to find. Not confuse with the <see cref="MAP.GraphId"/> value.</param>
491491
/// <returns>Returns the <see cref="MAP"/> filename value.</returns>
@@ -495,40 +495,40 @@ public string GetFilename(int index)
495495
}
496496

497497
/// <summary>
498-
/// Validate if the file is a valid <see cref="FPG"/> file.
498+
/// Validates if the file is a valid <see cref="FPG"/> file.
499499
/// </summary>
500500
/// <param name="filename">File to validate.</param>
501-
/// <returns>Returns true if the file is a valid <see cref="FPG"/>.</returns>
501+
/// <returns>Returns <see langword="true"/> if the file is a valid <see cref="FPG"/>.</returns>
502502
public static bool ValidateFormat(string filename)
503503
{
504504
return VALIDATOR.Validate(filename);
505505
}
506506

507507
/// <summary>
508-
/// Validate if the file is a valid <see cref="FPG"/> file.
508+
/// Validates if the file is a valid <see cref="FPG"/> file.
509509
/// </summary>
510510
/// <param name="buffer">Memory buffer that contain a <see cref="FPG"/> file data.</param>
511-
/// <returns>Returns true if the file is a valid <see cref="FPG"/>.</returns>
511+
/// <returns>Returns <see langword="true"/> if the file is a valid <see cref="FPG"/>.</returns>
512512
public static bool ValidateFormat(byte[] buffer)
513513
{
514514
return VALIDATOR.Validate(buffer);
515515
}
516516

517517
/// <summary>
518-
/// Validate if the file is a valid <see cref="FPG"/> file.
518+
/// Validates if the file is a valid <see cref="FPG"/> file.
519519
/// </summary>
520520
/// <param name="filename">File to validate.</param>
521-
/// <returns>Returns true if the file is a valid <see cref="FPG"/>.</returns>
521+
/// <returns>Returns <see langword="true"/> if the file is a valid <see cref="FPG"/>.</returns>
522522
public bool Validate(string filename)
523523
{
524524
return this.Validate(File.ReadAllBytes(filename));
525525
}
526526

527527
/// <summary>
528-
/// Validate if the file is a valid <see cref="FPG"/> file.
528+
/// Validates if the file is a valid <see cref="FPG"/> file.
529529
/// </summary>
530530
/// <param name="buffer">Memory buffer that contain a <see cref="FPG"/> file data.</param>
531-
/// <returns>Returns true if the file is a valid <see cref="FPG"/>.</returns>
531+
/// <returns>Returns <see langword="true"/> if the file is a valid <see cref="FPG"/>.</returns>
532532
public bool Validate(byte[] buffer)
533533
{
534534
return FPG_FILE_HEADER.Validate(buffer[0..DIVFileHeader.SIZE]) && this.TryToReadFile(buffer);
@@ -561,7 +561,7 @@ bool TryToReadFile(byte[] buffer)
561561
}
562562

563563
/// <summary>
564-
/// Serialize the <see cref="FPG"/> instance in a <see cref="byte"/> array.
564+
/// Serializes the <see cref="FPG"/> instance in a <see cref="byte"/> array.
565565
/// </summary>
566566
/// <returns>Returns the <see cref="byte"/> array with the <see cref="FPG"/> serialized data.</returns>
567567
/// <remarks>This function not include the file header data.</remarks>
@@ -578,7 +578,7 @@ public byte[] Serialize()
578578
}
579579

580580
/// <summary>
581-
/// Write this instance data in a <see cref="BinaryWriter"/> instance.
581+
/// Writes this instance data in a <see cref="BinaryWriter"/> instance.
582582
/// </summary>
583583
/// <param name="stream"><see cref="BinaryWriter"/> instance.</param>
584584
public void Write(BinaryWriter stream)
@@ -587,7 +587,7 @@ public void Write(BinaryWriter stream)
587587
}
588588

589589
/// <summary>
590-
/// Save the instance in a <see cref="FPG"/> file.
590+
/// Saves the instance in a <see cref="FPG"/> file.
591591
/// </summary>
592592
/// <param name="filename">Filename to write the data.</param>
593593
public void Save(string filename)
@@ -630,7 +630,7 @@ public override bool Equals(object obj)
630630
}
631631

632632
/// <summary>
633-
/// Generate a hash code for this instance.
633+
/// Generates a hash code for this instance.
634634
/// </summary>
635635
/// <returns>Returns an <see cref="int"/> SHA256 hash code from the MD5 hash created by the binary serialized data of this instance.</returns>
636636
public override int GetHashCode()

0 commit comments

Comments
 (0)