Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a couple of private property setters in OLEPropertiesContainer #178

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public class OLEPropertiesContainer

public bool HasUserDefinedProperties { get; private set; }

public ContainerType ContainerType { get; internal set; }
public ContainerType ContainerType { get; }
private Guid? FmtID0 { get; }

public PropertyContext Context { get; private set; }
public PropertyContext Context { get; }

private readonly List<OLEProperty> properties = new List<OLEProperty>();
internal CFStream cfStream;
Expand Down Expand Up @@ -126,8 +126,6 @@ internal OLEPropertiesContainer(CFStream cfStream)
UserDefinedProperties = new OLEPropertiesContainer(pStream.PropertySet1.PropertyContext.CodePage, ContainerType.UserDefinedProperties);
HasUserDefinedProperties = true;

UserDefinedProperties.ContainerType = ContainerType.UserDefinedProperties;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ContainerType property in OLEPropertiesContaineris set to the value passed into the constructor, so I don't think it needs to be set here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove this line without the other changes though


for (int i = 0; i < pStream.PropertySet1.Properties.Count; i++)
{
if (pStream.PropertySet1.PropertyIdentifierAndOffsets[i].PropertyIdentifier == 0) continue;
Expand Down