Skip to content

Commit

Permalink
Merge pull request #809 from microsoft/metadataUpdate2
Browse files Browse the repository at this point in the history
Update metadata to 39.0.18-preview
  • Loading branch information
AArnott committed Nov 29, 2022
2 parents 13285db + e43f51f commit a925c50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<MetadataVersion>38.0.19-preview</MetadataVersion>
<MetadataVersion>39.0.18-preview</MetadataVersion>
<!-- <DiaMetadataVersion>0.2.185-preview-g7e1e6a442c</DiaMetadataVersion> -->
<ApiDocsVersion>0.1.12-alpha</ApiDocsVersion>
</PropertyGroup>
Expand Down
9 changes: 6 additions & 3 deletions src/Microsoft.Windows.CsWin32/Generator.Com.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,11 +746,13 @@ private bool TryGetPropertyAccessorInfo(MethodDefinition methodDefinition, strin
}

const string getterPrefix = "get_";
const string setterPrefix = "put_";
const string putterPrefix = "put_";
const string setterPrefix = "set_";
bool isGetter = methodName.StartsWith(getterPrefix, StringComparison.Ordinal);
bool isPutter = methodName.StartsWith(putterPrefix, StringComparison.Ordinal);
bool isSetter = methodName.StartsWith(setterPrefix, StringComparison.Ordinal);

if (isGetter || isSetter)
if (isGetter || isPutter || isSetter)
{
if (!IsHresult(signature.ReturnType))
{
Expand Down Expand Up @@ -778,8 +780,9 @@ private bool TryGetPropertyAccessorInfo(MethodDefinition methodDefinition, strin
return true;
}

if (isSetter)
if (isSetter || isPutter)
{
Debug.Assert(setterPrefix.Length == putterPrefix.Length, "If these lengths do not equal, our Substring math may be wrong.");
propertyName = SafeIdentifierName(methodName.Substring(setterPrefix.Length));
accessorKind = SyntaxKind.SetAccessorDeclaration;
return true;
Expand Down

0 comments on commit a925c50

Please sign in to comment.