Пример #1
0
        public IntPtr AsOCRepPayload()
        {
            IntPtr handle = OCPayloadInterop.OCRepPayloadCreate();
            bool   ok     = false;

            if (!string.IsNullOrEmpty(_uri))
            {
                ok = OCPayloadInterop.OCRepPayloadSetUri(handle, _uri);
            }
            (Values as IotivityValueDictionary).AssignToOCRepPayload(handle);
            foreach (var resourceType in Types)
            {
                ok = OCPayloadInterop.OCRepPayloadAddResourceType(handle, resourceType);
            }
            if (Next != null)
            {
                OCPayloadInterop.OCRepPayloadAppend(handle, Next.AsOCRepPayload());
            }
            return(handle);
        }
Пример #2
0
 public RepPayload() : this(OCPayloadInterop.OCRepPayloadCreate())
 {
 }