Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Documentation question on CsScript. Get List<>, collections.
#1
Hi -

I'm not understanding the syntax in the CsScript example - user interface:
Macro CsScript example - use interface
Code:
Copy      Help
interface# IFast :IDispatch
,#Add(a b)
,[p]Prop(x)
,[g]#Prop
,#Overload(x)
,#Overload_2(BSTR's)
,{C7D9B459-0108-4F4A-9483-A7F60F18AF0A}

I'm guessing that # means number, [p] is put, and [g] is get? What I want to do is return a more complex data structure - something like this:

Function ParseJson
Code:
Copy      Help
[DataContract]
public class Results
{
;;;;[DataMember]
;;;;public List<BodyField> bodyItems { get; set; }
;;;;[DataMember]
;;;;public ImpressionItems impressionItems { get; set; }
;;;;[DataMember]
;;;;public RecommendationItems recommendationItems { get; set; }
}

where the elements of the returned object were themselves objects. The objects are composed of List<> and collections of strings. They are [DataContract]/[DataMembers] because they are used by DataContractJsonSerializer to map JSON to C# objects.

Do I have to define a GUID for each class type?

Thanks

Sean


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)