コード例 #1
0
 public RepPayload(IDictionary <string, object> data = null) : this()
 {
     if (data is IotivityValueDictionary)
     {
         Values = data;
     }
     else
     {
         Values = new IotivityValueDictionary(data);
     }
 }
コード例 #2
0
        internal RepPayload(IntPtr handle) : this()
        {
            var ocpayload = Marshal.PtrToStructure <OCRepPayload>(handle);

            if (ocpayload.interfaces != IntPtr.Zero)
            {
                var resource = Marshal.PtrToStructure <OCStringLL>(ocpayload.interfaces);
                Interfaces = resource.Values.ToArray();
            }
            if (ocpayload.types != IntPtr.Zero)
            {
                var resource = Marshal.PtrToStructure <OCStringLL>(ocpayload.types);
                Types = resource.Values.ToArray();
            }
            if (ocpayload.next != IntPtr.Zero)
            {
                Next = new RepPayload(ocpayload.next);
            }
            Values = new IotivityValueDictionary(ocpayload);
        }
コード例 #3
0
 public RepPayload() : base()
 {
     Interfaces = new List <string>();
     Types      = new List <string>();
     Values     = new IotivityValueDictionary();
 }