コード例 #1
0
        public async Task SyncAndUpdateSfTwinPropertiesFromTwin()
        {
            try
            {
                Twin twin = await GetTwinAsync();

                _sfTwinProperties = SfTwinProperties.CreateSfTwinProperties(twin);
                await syncReportedSystemPropertiesAsync(twin.Properties.Desired);
            }
            catch (Exception ex)
            {
                Logger.showError(TAG, "SyncAndUpdateSfTwinPropertiesFromTwin Exception: {0}".FormatInvariant(ex.Message.ToString()));
            }
        }
コード例 #2
0
        public async Task <JObject> GetReportedCustomerPropertiesAsync()
        {
            try
            {
                Twin twin = await GetTwinAsync();

                return(SfTwinProperties.GetReportedCustomerProperties(twin));
            }
            catch (Exception ex)
            {
                Logger.showError(TAG, "GetReportedCustomerPropertiesAsync Exception: ".FormatInvariant(ex.Message.ToString()));
            }

            return(null);
        }