Reporter | Lilia Shamsutdinova (Lilia.Shamsutdinova) |
---|---|
Created | Apr 13, 2018 10:11:47 PM |
Updated | Apr 13, 2018 10:11:47 PM |
Subsystem | Refactorings |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Major |
State | Submitted |
Type | Bug |
Fix version | Backlog |
Affected versions | 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
JetBrains ReSharper Ultimate 2018.1 #12.0.20180413.123914.
- Invoke "Create other -> Create parameter 'OnEndReceive' in containing method and pull" QF on
OnEndReceive
.
Actual result:
Uncompilable code:
public interface IUdpClient
{
void Listen(int listenPort);
}
public class UdpClientWrapper : IUdpClient
{
protected UdpClient UdpClient { get; set; }
public void Listen(int listenPort, AsyncCallback OnEndReceive)
{
// Refactor: Create parameter 'OnEndReceive'
// in containing method and update hierarchy
UdpClient.BeginReceive(OnEndReceive, messageState);
}
}
Expected result:
Compilable code.
NOTE:
"Create other -> Create parameter 'OnEndReceive' in containing method" QF produces compilable code:
public interface IUdpClient
{
void Listen(int listenPort, AsyncCallback OnEndReceive);
}
public class UdpClientWrapper : IUdpClient
{
protected UdpClient UdpClient { get; set; }
public void Listen(int listenPort, AsyncCallback OnEndReceive)
{
// Refactor: Create parameter 'OnEndReceive'
// in containing method and update hierarchy
UdpClient.BeginReceive(OnEndReceive, messageState);
}
}