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

Use Fody ConfigureAwait library instead of manual ConfigureAwait calls. #2645

Merged
merged 10 commits into from
Feb 6, 2020

Conversation

maliming
Copy link
Member

<Import Project="configureawait.props" />

<Project>
  <ItemGroup>
      <PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" />
      <PackageReference Include="Fody" Version="6.0.6">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
      </PackageReference>
  </ItemGroup>
</Project>
FodyWeavers.xml 

<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
  <ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers> 
FodyWeavers.xsd 

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
  <xs:element name="Weavers">
    <xs:complexType>
      <xs:all>
        <xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="VerifyAssembly" type="xs:boolean">
        <xs:annotation>
          <xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="VerifyIgnoreCodes" type="xs:string">
        <xs:annotation>
          <xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GenerateXsd" type="xs:boolean">
        <xs:annotation>
          <xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
</xs:schema> 

image

@maliming
Copy link
Member Author

I will do more tests.

@maliming maliming requested a review from hikalkan January 17, 2020 07:06
@hikalkan hikalkan added this to the 2.1 milestone Jan 17, 2020
@hikalkan
Copy link
Member

Related to #2577

@hikalkan
Copy link
Member

@maliming if that's OK, I will merge.

@maliming
Copy link
Member Author

I need to remove ConfigureAwait(false) in the test project.

@maliming
Copy link
Member Author

If there are no other issues to investigate, you can merge it.

@hikalkan
Copy link
Member

hikalkan commented Feb 5, 2020

@maliming I forked your PR branch, compiled the code, opened the Volo.Abp.Authorization.dll (as an example) in the JetBrains DotPeek and didn't see the ConfigureAwait calls.

Screenshot:

image

What I am missing?

@maliming
Copy link
Member Author

maliming commented Feb 6, 2020

hi @hikalkan
I use ILSpy and dnSpy.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants