我有一个简短的代码片段,存在于大约一百个项目中:
new ServiceInstanceListener(serviceContext => new OwinCommunicationListener(Startup.ConfigureApp,
serviceContext, ServiceEventSource.Current, "ServiceEndpoint"))
我想将其替换为:
new ServiceInstanceListener(serviceContext => new OwinCommunicationListener(Startup.ConfigureApp,
serviceContext, ServiceEventSource.Current, "ServiceEndpointHttps"))
请注意,我要搜索的代码段可能采用不同的格式:
可能全部在一行
new ServiceInstanceListener(serviceContext => new OwinCommunicationListener(Startup.ConfigureApp, serviceContext, ServiceEventSource.Current, "ServiceEndpoint"))
可能有多行:
new ServiceInstanceListener
(serviceContext =>
new OwinCommunicationListener
(Startup.ConfigureApp,
serviceContext,
ServiceEventSource.Current, "ServiceEndpoint"))
如何在这种情况下执行结构查找/替换?