@@ -163,10 +163,7 @@ public int WriteTagDataEntryHeader(IccTypeSignature signature)
163163 /// </summary>
164164 /// <param name="value">The entry to write</param>
165165 /// <returns>The number of bytes written</returns>
166- public int WriteUnknownTagDataEntry ( IccUnknownTagDataEntry value )
167- {
168- return this . WriteArray ( value . Data ) ;
169- }
166+ public int WriteUnknownTagDataEntry ( IccUnknownTagDataEntry value ) => this . WriteArray ( value . Data ) ;
170167
171168 /// <summary>
172169 /// Writes a <see cref="IccChromaticityTagDataEntry"/>
@@ -269,10 +266,7 @@ public int WriteDataTagDataEntry(IccDataTagDataEntry value)
269266 /// </summary>
270267 /// <param name="value">The entry to write</param>
271268 /// <returns>The number of bytes written</returns>
272- public int WriteDateTimeTagDataEntry ( IccDateTimeTagDataEntry value )
273- {
274- return this . WriteDateTime ( value . Value ) ;
275- }
269+ public int WriteDateTimeTagDataEntry ( IccDateTimeTagDataEntry value ) => this . WriteDateTime ( value . Value ) ;
276270
277271 /// <summary>
278272 /// Writes a <see cref="IccLut16TagDataEntry"/>
@@ -563,6 +557,7 @@ public int WriteMultiLocalizedUnicodeTagDataEntry(IccMultiLocalizedUnicodeTagDat
563557 long tpos = this . dataStream . Position ;
564558 this . dataStream . Position += cultureCount * 12 ;
565559
560+ // TODO: Investigate cost of Linq GroupBy
566561 IGrouping < string , IccLocalizedString > [ ] texts = value . Texts . GroupBy ( t => t . Text ) . ToArray ( ) ;
567562
568563 uint [ ] offset = new uint [ texts . Length ] ;
@@ -625,7 +620,7 @@ public int WriteMultiProcessElementsTagDataEntry(IccMultiProcessElementsTagDataE
625620 long tpos = this . dataStream . Position ;
626621 this . dataStream . Position += value . Data . Length * 8 ;
627622
628- IccPositionNumber [ ] posTable = new IccPositionNumber [ value . Data . Length ] ;
623+ var posTable = new IccPositionNumber [ value . Data . Length ] ;
629624 for ( int i = 0 ; i < value . Data . Length ; i ++ )
630625 {
631626 uint offset = ( uint ) ( this . dataStream . Position - start ) ;
@@ -673,10 +668,7 @@ public int WriteNamedColor2TagDataEntry(IccNamedColor2TagDataEntry value)
673668 /// </summary>
674669 /// <param name="value">The entry to write</param>
675670 /// <returns>The number of bytes written</returns>
676- public int WriteParametricCurveTagDataEntry ( IccParametricCurveTagDataEntry value )
677- {
678- return this . WriteParametricCurve ( value . Curve ) ;
679- }
671+ public int WriteParametricCurveTagDataEntry ( IccParametricCurveTagDataEntry value ) => this . WriteParametricCurve ( value . Curve ) ;
680672
681673 /// <summary>
682674 /// Writes a <see cref="IccProfileSequenceDescTagDataEntry"/>
@@ -793,20 +785,14 @@ public int WriteFix16ArrayTagDataEntry(IccFix16ArrayTagDataEntry value)
793785 /// </summary>
794786 /// <param name="value">The entry to write</param>
795787 /// <returns>The number of bytes written</returns>
796- public int WriteSignatureTagDataEntry ( IccSignatureTagDataEntry value )
797- {
798- return this . WriteAsciiString ( value . SignatureData , 4 , false ) ;
799- }
788+ public int WriteSignatureTagDataEntry ( IccSignatureTagDataEntry value ) => this . WriteAsciiString ( value . SignatureData , 4 , false ) ;
800789
801790 /// <summary>
802791 /// Writes a <see cref="IccTextTagDataEntry"/>
803792 /// </summary>
804793 /// <param name="value">The entry to write</param>
805794 /// <returns>The number of bytes written</returns>
806- public int WriteTextTagDataEntry ( IccTextTagDataEntry value )
807- {
808- return this . WriteAsciiString ( value . Text ) ;
809- }
795+ public int WriteTextTagDataEntry ( IccTextTagDataEntry value ) => this . WriteAsciiString ( value . Text ) ;
810796
811797 /// <summary>
812798 /// Writes a <see cref="IccUFix16ArrayTagDataEntry"/>
@@ -829,40 +815,28 @@ public int WriteUFix16ArrayTagDataEntry(IccUFix16ArrayTagDataEntry value)
829815 /// </summary>
830816 /// <param name="value">The entry to write</param>
831817 /// <returns>The number of bytes written</returns>
832- public int WriteUInt16ArrayTagDataEntry ( IccUInt16ArrayTagDataEntry value )
833- {
834- return this . WriteArray ( value . Data ) ;
835- }
818+ public int WriteUInt16ArrayTagDataEntry ( IccUInt16ArrayTagDataEntry value ) => this . WriteArray ( value . Data ) ;
836819
837820 /// <summary>
838821 /// Writes a <see cref="IccUInt32ArrayTagDataEntry"/>
839822 /// </summary>
840823 /// <param name="value">The entry to write</param>
841824 /// <returns>The number of bytes written</returns>
842- public int WriteUInt32ArrayTagDataEntry ( IccUInt32ArrayTagDataEntry value )
843- {
844- return this . WriteArray ( value . Data ) ;
845- }
825+ public int WriteUInt32ArrayTagDataEntry ( IccUInt32ArrayTagDataEntry value ) => this . WriteArray ( value . Data ) ;
846826
847827 /// <summary>
848828 /// Writes a <see cref="IccUInt64ArrayTagDataEntry"/>
849829 /// </summary>
850830 /// <param name="value">The entry to write</param>
851831 /// <returns>The number of bytes written</returns>
852- public int WriteUInt64ArrayTagDataEntry ( IccUInt64ArrayTagDataEntry value )
853- {
854- return this . WriteArray ( value . Data ) ;
855- }
832+ public int WriteUInt64ArrayTagDataEntry ( IccUInt64ArrayTagDataEntry value ) => this . WriteArray ( value . Data ) ;
856833
857834 /// <summary>
858835 /// Writes a <see cref="IccUInt8ArrayTagDataEntry"/>
859836 /// </summary>
860837 /// <param name="value">The entry to write</param>
861838 /// <returns>The number of bytes written</returns>
862- public int WriteUInt8ArrayTagDataEntry ( IccUInt8ArrayTagDataEntry value )
863- {
864- return this . WriteArray ( value . Data ) ;
865- }
839+ public int WriteUInt8ArrayTagDataEntry ( IccUInt8ArrayTagDataEntry value ) => this . WriteArray ( value . Data ) ;
866840
867841 /// <summary>
868842 /// Writes a <see cref="IccViewingConditionsTagDataEntry"/>
0 commit comments