sharing enum wcf service


i have few opposite applications among i'd share c# enum. i can't definitely figure out share an enum chapter between unchanging concentration wcf service.



here's situation. i have 2 lightweight c# destop apps wcf webservice need share enum values.



client 1



 method1( myenum e, twine suserid );


client 2



method2( myenum e, twine suserid );


webservice



servicemethod1( myenum e, twine suserid, twine ssomedata);


my initial nonetheless emanate library called common.dll encapsulate enum following only anxiety library projects where enum needed. however, wcf creates things challenging since need markup enum an simple biased service. this:



[servicecontract]
[serviceknowntype(typeof(myenum))]
public interface imyservice
{
[operationcontract]
servicemethod1( myenum e, twine suserid, twine ssomedata);
}

[datacontract]
public enum myenum{ [enummember] red, [enummember] green, [enummember] blue };


so .... there proceed share an enum among wcf use applictions?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?