Skip to content

Convert AxHost to use Pointers#9847

Merged
lonitra merged 6 commits intodotnet:mainfrom
lonitra:axhostptrs
Sep 7, 2023
Merged

Convert AxHost to use Pointers#9847
lonitra merged 6 commits intodotnet:mainfrom
lonitra:axhostptrs

Conversation

@lonitra
Copy link
Copy Markdown
Member

@lonitra lonitra commented Sep 5, 2023

  • Add StorageType enumto track what interface _instance is
  • Remove T.Interface fields in AxHost and query interface on _instance based onStorageType
  • Use StorageType.PropertyBag where appropriate. We never explicitly defined this before, but were essentially following the same pattern as the other storage cases
  • Fix PropertyBag storage cases. This was likely never working due to this case always throwing in AxHost.DepersistControl
  • Update methods in AxHost.State to use pointers instead of T.Interface

@lonitra lonitra requested a review from a team as a code owner September 5, 2023 22:10
Copy link
Copy Markdown
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

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

Added a few comments. We probably should convert STG_* into a StorageType enum and add something for PropertyBag.

@@ -2812,35 +2826,36 @@ private void DepersistControl()
// Must init new:
if (_instance is IPersistStreamInit.Interface init)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All of these is checks need to go away. You need to query for the desired interface pointer.

@ghost ghost added waiting-author-feedback The team requires more information from the author and removed waiting-author-feedback The team requires more information from the author labels Sep 5, 2023
@ghost ghost assigned lonitra Sep 6, 2023
Copy link
Copy Markdown
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

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

A few more comments

@ghost ghost added waiting-author-feedback The team requires more information from the author and removed waiting-author-feedback The team requires more information from the author labels Sep 6, 2023
Copy link
Copy Markdown
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

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

Looks good!

@lonitra lonitra merged commit 0dba064 into dotnet:main Sep 7, 2023
@lonitra lonitra deleted the axhostptrs branch September 7, 2023 17:34
@ghost ghost locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants