How to add an attribute to a method declared on partial interface?
Ihave this code on a file
using System;
using System.Net.Security;
using WCF = global::System.ServiceModel;
namespace CMAWCF.ServiceContracts
{
public partial interface IMyServiceServiceContract
{
[WCF::TransactionFlow(WCF::TransactionFlowOption.Mandatory)]
void DoSomething(CMAWCF.MessageContracts.RequestDoSomething
request);
}
}
and this code was generated by a tool on other file on the same project
using System;
using System.Net.Security;
using WCF = global::System.ServiceModel;
namespace CMAWCF.ServiceContracts
{
public partial interface IMyServiceServiceContract
{
[WCF::FaultContract(typeof(CMAWCF.FaultContracts.DefaultFaultContract))]
[WCF::OperationContract(IsTerminating = false, IsInitiating =
true, IsOneWay = false, AsyncPattern = false, Action = "DoSomething",
ProtectionLevel = ProtectionLevel.None)]
void DoSomething(CMAWCF.MessageContracts.RequestDoSomething
request);
}
}
But I got an error:
Type 'CMAWCF.ServiceContracts.IMyServiceServiceContract' already defines a member called 'DoSomething' with the same parameter types
How can I get an output like this:
using System;
using System.Net.Security;
using WCF = global::System.ServiceModel;
namespace CMAWCF.ServiceContracts
{
public partial interface IMyServiceServiceContract
{
[WCF::TransactionFlow(WCF::TransactionFlowOption.Mandatory)]
[WCF::FaultContract(typeof(CMAWCF.FaultContracts.DefaultFaultContract))]
[WCF::OperationContract(IsTerminating = false, IsInitiating =
true, IsOneWay = false, AsyncPattern = false, Action = "DoSomething",
ProtectionLevel = ProtectionLevel.None)]
void DoSomething(CMAWCF.MessageContracts.RequestDoSomething
request);
}
}
I found some
discussion about it, but nothing solid. Any idea? thanks in advance.