@@ -10,7 +10,7 @@ public enum ContainerType
1010 UserDefinedProperties = 3 ,
1111 GlobalInfo = 4 ,
1212 ImageContents = 5 ,
13- ImageInfo = 6
13+ ImageInfo = 6 ,
1414}
1515
1616public class OlePropertiesContainer
@@ -34,7 +34,7 @@ public class OlePropertiesContainer
3434 private readonly List < OleProperty > properties = new ( ) ;
3535
3636 /// <summary>
37- /// Create a new instance of <see cref="OlePropertiesContainer"/> with the specified code page and container type .
37+ /// Initializes a new instance of the <see cref="OlePropertiesContainer"/> class .
3838 /// </summary>
3939 /// <param name="codePage">The code page to use for the new container.</param>
4040 /// <param name="containerType">The type of the new container.</param>
@@ -43,7 +43,7 @@ public OlePropertiesContainer(int codePage, ContainerType containerType)
4343 Context = new PropertyContext
4444 {
4545 CodePage = codePage ,
46- Behavior = Behavior . CaseInsensitive
46+ Behavior = Behavior . CaseInsensitive ,
4747 } ;
4848
4949 ContainerType = containerType ;
@@ -69,16 +69,15 @@ public OlePropertiesContainer(CfbStream cfStream)
6969 {
7070 PropertyIdentifierAndOffset propertyIdentifierAndOffset = pStream . PropertySet0 . PropertyIdentifierAndOffsets [ i ] ;
7171 if ( propertyIdentifierAndOffset . PropertyIdentifier == SpecialPropertyIdentifiers . Dictionary ) continue ;
72- //if (propertyIdentifierAndOffset.PropertyIdentifier == 1) continue;
73- //if (propertyIdentifierAndOffset.PropertyIdentifier == 0x80000000) continue;
74-
72+ // if (propertyIdentifierAndOffset.PropertyIdentifier == 1) continue;
73+ // if (propertyIdentifierAndOffset.PropertyIdentifier == 0x80000000) continue;
7574 var p = ( ITypedPropertyValue ) pStream . PropertySet0 . Properties [ i ] ;
7675
7776 OleProperty op = new ( this )
7877 {
7978 VTType = p . VTType ,
8079 PropertyIdentifier = propertyIdentifierAndOffset . PropertyIdentifier ,
81- Value = p . Value
80+ Value = p . Value ,
8281 } ;
8382
8483 properties . Add ( op ) ;
@@ -101,7 +100,7 @@ public OlePropertiesContainer(CfbStream cfStream)
101100 {
102101 VTType = p . VTType ,
103102 PropertyIdentifier = propertyIdentifierAndOffset . PropertyIdentifier ,
104- Value = p . Value
103+ Value = p . Value ,
105104 } ;
106105
107106 UserDefinedProperties . properties . Add ( op ) ;
@@ -121,7 +120,7 @@ public OleProperty CreateProperty(VTPropertyType vtPropertyType, uint propertyId
121120 OleProperty op = new ( this )
122121 {
123122 VTType = vtPropertyType ,
124- PropertyIdentifier = propertyIdentifier
123+ PropertyIdentifier = propertyIdentifier ,
125124 } ;
126125
127126 return op ;
@@ -136,7 +135,7 @@ public OleProperty CreateProperty(VTPropertyType vtPropertyType, uint propertyId
136135 /// <param name="name">The name of the new property.</param>
137136 /// <returns>The new property.</returns>
138137 /// <exception cref="InvalidOperationException">If UserDefinedProperties aren't allowed for this container.</exception>
139- /// <exception cref="ArgumentException">If a property with the name <paramref name="name"/> already exists."/></exception>
138+ /// <exception cref="ArgumentException">If a property with the name <paramref name="name"/> already exists."/>. </exception>
140139 public OleProperty AddUserDefinedProperty ( VTPropertyType vtPropertyType , string name )
141140 {
142141 if ( this . ContainerType != ContainerType . UserDefinedProperties )
@@ -166,7 +165,7 @@ public OleProperty AddUserDefinedProperty(VTPropertyType vtPropertyType, string
166165 var op = new OleProperty ( this )
167166 {
168167 VTType = vtPropertyType ,
169- PropertyIdentifier = identifier
168+ PropertyIdentifier = identifier ,
170169 } ;
171170
172171 properties . Add ( op ) ;
@@ -200,14 +199,14 @@ public OlePropertiesContainer CreateUserDefinedProperties(int codePage)
200199 // Create the container, and add the code page to the initial set of properties
201200 UserDefinedProperties = new OlePropertiesContainer ( codePage , ContainerType . UserDefinedProperties )
202201 {
203- PropertyNames = new Dictionary < uint , string > ( )
202+ PropertyNames = new Dictionary < uint , string > ( ) ,
204203 } ;
205204
206205 var op = new OleProperty ( UserDefinedProperties )
207206 {
208207 VTType = VTPropertyType . VT_I2 ,
209208 PropertyIdentifier = 1 ,
210- Value = ( short ) codePage
209+ Value = ( short ) codePage ,
211210 } ;
212211
213212 UserDefinedProperties . properties . Add ( op ) ;
@@ -236,8 +235,8 @@ public void Save(Stream cfStream)
236235
237236 PropertySet0 = new PropertySet
238237 {
239- PropertyContext = Context
240- }
238+ PropertyContext = Context ,
239+ } ,
241240 } ;
242241
243242 // If we're writing an AppSpecific property set and have property names, then add a dictionary property
@@ -263,7 +262,7 @@ public void Save(Stream cfStream)
263262
264263 ps . PropertySet1 = new PropertySet
265264 {
266- PropertyContext = UserDefinedProperties . Context
265+ PropertyContext = UserDefinedProperties . Context ,
267266 } ;
268267
269268 ps . FMTID1 = FormatIdentifiers . UserDefinedProperties ;
0 commit comments