datacontract Questions

1

Solved

I am writing a library which is a set of classes meant to be shared between many different .NET applications, including at least one which uses the .NET compact framework. I have been making these ...

3

Solved

I recently noticed in one of the articles the wcf service operation returned a collectiondatacontract Users GetUsers(string someInput); And Users type was defined as below: [CollectionDataContr...
Interrupt asked 21/4, 2011 at 0:34

3

I use the DataContractJsonSerializer to parse a json string into a object hierarchie. The json string looks like this: { "groups": [ { "attributes": [ { "sortOrder": "1", "value": "A" }, {...
Gradus asked 4/10, 2011 at 12:9

1

Solved

I am testing a WCF service method which accepts a DC type parameter, some of my DC properties are of type List. How do i pass values to that, I tried strings in "", did not accept, Please refer the...
Rothmuller asked 10/1, 2012 at 8:21

2

Solved

I have have a WCF derived/base contract issue. I have a server interface/contract that returns a BaseThing object: [OperationContract] BaseThing Get_base_thing(); The server that implements this...
Anguiano asked 6/12, 2011 at 15:22

1

Solved

During applying data I use notifyChange with an Uri. Let's say I notify content://com.package.my/items. I have also detail Activity that displays data from content://com.package.my/items/1. Do...
Inky asked 6/12, 2011 at 8:41

1

Solved

I want to use a custom aplified type (think Nullable) in a DataContract class. I tried to write a IDataContractSurrogate but it fails at deserialization. My amplified type looks like this: public...

1

Solved

I have a datacontact with many members that has a custom class I would like to force a new instance if the property is null on deserialization. is there a way to do that?
Cenacle asked 10/11, 2011 at 19:0

1

Solved

I've worked with WCF for awhile now and in places where both client and server tend to be co-released; that is, new versions have almost always been released at the same time. Interoperability and ...
Teleplay asked 27/10, 2011 at 3:24

3

Solved

How would I tell the WCF service what KnownTypes to use when passing data back to the client? I know I can use the [ServiceKnownType] attribute, which makes the service call run fine from a WCF Te...
Bridgetbridgetown asked 1/10, 2010 at 15:6

1

Solved

I have written a ContractInvariantMethod for a data contract class, and everything works great on the client side, however when an object of this type is sent to my service, and the Data Contract D...
Tract asked 7/8, 2011 at 11:7

1

Solved

As I understand it you should use the Order property of the DataMember attribute so that you can add things to the data contract without the change in order causing things to break, but how should ...
Wingfooted asked 1/6, 2011 at 13:56

1

Solved

I would like to add a DataMember to one of my DataContracts. I would like to know how existing servers and clients will behave in the presence of a new DataMember if one of the parties isn't update...
Windburn asked 11/4, 2011 at 16:56

2

Solved

I understand that we can have more controls on a class if we use datacontract, however, consider the following 2 cases [DataContract] public class Customer { [DataMember] public string CustomerN...
Compressive asked 18/1, 2011 at 8:55

2

Solved

I am working on WCF service. My all class are already serialize using [Serializable] attribute but due to "k__BackingField" Property Naming problem I used DataContract and DataMember attribute. so ...
Ule asked 23/3, 2011 at 12:23

1

Solved

In WCF you can define a contract using the [DataContract] and [DataMember] attributes, like this: [DataContract] public class Sample { [DataMember(EmitDefaultValue = false, IsRequired = false)] ...
Jacynth asked 21/3, 2011 at 19:8

1

Solved

I have the following code: [DataContract] class TestContract { private String _Name; private Int32 _Age; [DataMember( Name = "Name" )] public String Name { get { return _Name; } set { _Name...
Marathi asked 2/2, 2011 at 13:48

2

Solved

Is it possible to deserialize this XML into an object marked with the DataContract attribute? <root> <distance units="m">1000</distance> </root> As you may see there is "...
Halona asked 1/2, 2011 at 4:12

3

Solved

What does it mean to put a DataMemberAttribute on an interface member? How does this affect derived classes?
Excitability asked 25/1, 2011 at 8:48

2

Solved

r@".NETFramework\v4.0\Profile\Client\System.Runtime.Serialization.dll" open System.Runtime.Serialization open System.Runtime.Serialization.Json [<DataContract>] type geo = { [&lt...
Ineducation asked 24/8, 2010 at 11:32

5

Solved

I'm working on a kind of "store and forward" application for WCF services. I want to save the message in a database as a raw XML blob, as XElement. I'm having a bit of trouble converting the dataco...
Heinz asked 3/7, 2009 at 4:22

2

Solved

I have a common library with some objects in it. Then I have a service project that references the common library and creates some derived types from objects in the common library. I want my servi...
Residentiary asked 10/11, 2010 at 3:16

3

Solved

I am trying to create a class with a read-only Id field, however I am having problems retaining the value when the object passes through the WCF server. I cannot set the [DataMember] attribute on ...
Palinode asked 29/9, 2010 at 13:51

2

Solved

I have a Data Access Layer, a Service Layer, and a Presentation Layer. The Presentation Layer is ASP.NET MVC2 RTM (web), and the Service Layer is WCF (services). It's all .NET 3.5 SP1. The problem...

2

Solved

is there some way of sending the summary info of properties in a DataContract? e.g. [DataContract] public class MyClass { /// <summary> /// My Summary information /// </summary> [...
Friedcake asked 7/7, 2010 at 21:18

© 2022 - 2024 — McMap. All rights reserved.