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

reduce usage of getruntimeclassname #1043

Merged
merged 4 commits into from
Nov 12, 2021

Conversation

ujjwalchadha
Copy link
Contributor

No description provided.

public object DefaultStringParameters()
{
instance.DefaultStringProperty = "Hello";
return instance.DefaultObjectProperty;
Copy link
Member

Choose a reason for hiding this comment

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

return DefaultStringProperty?

@@ -26,7 +26,8 @@ namespace WinRT
#endif
static partial class ComWrappersSupport
{
private readonly static ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>(StringComparer.Ordinal);
private readonly static ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCacheForString = new ConcurrentDictionary<string, Func<IInspectable, object>>(StringComparer.Ordinal);
Copy link
Member

Choose a reason for hiding this comment

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

ForRuntimeClassName might be more clear?

@@ -330,25 +331,8 @@ private static bool IsIReferenceArray(Type implementationType)
Expression.Call(fromAbiMethod, Expression.Property(parms[0], "ThisPtr")), parms).Compile();
}

internal static Func<IInspectable, object> CreateTypedRcwFactory(string runtimeClassName)
internal static Func<IInspectable, object> CreateTypedRcwFactory(Type implementationType, string runtimeClassName = "")
Copy link
Member

Choose a reason for hiding this comment

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

I recall you were considering making the default null?

@ujjwalchadha ujjwalchadha merged commit 39fbcdf into master Nov 12, 2021
@ujjwalchadha ujjwalchadha deleted the ujjwalchadha/createobject_optimizations branch November 12, 2021 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants