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

Fix IDesignerSerializationManager nullability #79429

Merged
merged 3 commits into from
Dec 14, 2022
Merged

Fix IDesignerSerializationManager nullability #79429

merged 3 commits into from
Dec 14, 2022

Conversation

elachlan
Copy link
Contributor

@elachlan elachlan commented Dec 9, 2022

The documentation states that many of the functions can return null. So I have updated the nullability based on the documentation.

https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.design.serialization.idesignerserializationmanager?view=net-7.0

Related: dotnet/winforms#8342, #41720

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Dec 9, 2022
@ghost
Copy link

ghost commented Dec 9, 2022

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

Issue Details

The documentation states that many of the functions can return null. So I have updated the nullability based on the documentation.

https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.design.serialization.idesignerserializationmanager?view=net-7.0

Related: dotnet/winforms#8342, #41720

Author: elachlan
Assignees: -
Labels:

area-System.ComponentModel

Milestone: -

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks. The changes look correct to me, but you'll also need to update the corresponding signatures in the ref assembly:

public partial interface IDesignerSerializationManager : System.IServiceProvider
{
System.ComponentModel.Design.Serialization.ContextStack Context { get; }
System.ComponentModel.PropertyDescriptorCollection Properties { get; }
event System.ComponentModel.Design.Serialization.ResolveNameEventHandler ResolveName;
event System.EventHandler SerializationComplete;
void AddSerializationProvider(System.ComponentModel.Design.Serialization.IDesignerSerializationProvider provider);
object CreateInstance(System.Type type, System.Collections.ICollection arguments, string name, bool addToContainer);
object GetInstance(string name);
string GetName(object value);
object GetSerializer(System.Type objectType, System.Type serializerType);
System.Type GetType(string typeName);
void RemoveSerializationProvider(System.ComponentModel.Design.Serialization.IDesignerSerializationProvider provider);
void ReportError(object errorInformation);
void SetName(object instance, string name);
}

@elachlan
Copy link
Contributor Author

Failed test is unrelated afaik.

@buyaa-n
Copy link
Member

buyaa-n commented Dec 14, 2022

Failed test is unrelated afaik.

Right, they are unrelated and reported #79569, #79403, #79453, merging the PR

@buyaa-n buyaa-n merged commit bcef34d into dotnet:main Dec 14, 2022
@elachlan elachlan deleted the IDesignerSerializationManager-Nullable branch December 15, 2022 03:21
@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.ComponentModel community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants