c# - What is the standardized way to pass complex types in WCF? -


I am a newbie in the WCF, I am currently developing TCP WCF service and I am not sure that I understand the parameters correctly and understand it correctly. Either I advise you to comment and advise in a standardized way.

To clarify things, I have drawn a motive for which there is only one way and an external it depends on. Service Agreement Code

  [ServiceContract] Public Interface IMyService {{OperationContract} int test1 (Action type type, calculation type whistle, action); [Operation Contract] Int Test 2 (DataSeries); }  

Where actionType , calculation type , action external DLL and deliseries There is a declared class within a DLL.

The basic definition for the DataSeries class in DLL [serializable] only and no [datamember] on your members

I am using 3 DL on the client and server side, I am surprised that both the applications are without [DataContract] class on the class and without any [ EnumMember] inside the enums, [DataMember] inside the square.

What's going on?

Another experiment:

Using a service to remove a third party from the customer's side and I have been found that in 2008 vs. nimium and datasheet Class and mark them with the appropriate properties? Like [system. Codedom Complexer GeneratedDietAttit ("System Time-Period.", "3.0.0.0")] [System. time to time. Namespace = "http://schemas.datacontract.org/2004/07/DBInterface")] Public enum action type: int {[System.Runtime.Serialization.EnumMemberAttribute ()] All = 0, [System.Runtime.Serialization. Buy EnumMemberAttribute ()] = 1, [System.Runtime.Serialization.EnumMemberAttribute ()] Sell = 2,}

, and is used by attributes (usually or). If you are highlighting a closing point with TCP binding (), it is only necessary to note that with the DataContractSerializer you can only add serializableAttribute to your classes and it will automatically serial all areas.

I will give you the following suggestions: If you want to interoperate with your service, use basic HttpBinding and mark your classes DataContract and Database Features if your client is one. If you have a NET application, use Net TCPbunding and mark your class with serializable attribute.

You can also read it for comparison between different bindings.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -