Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientProperties related updates #2114

Merged
merged 4 commits into from
Jul 20, 2021

Conversation

abhipsaMisra
Copy link
Member

@abhipsaMisra abhipsaMisra commented Jul 20, 2021

This PR contains the following updates:

  • Update
public class ClientProperties : ClientPropertyCollection {
    public ClientProperties();
    public ClientPropertyCollection Writable { get; private set; }
}

to

public class ClientProperties {
    public ClientProperties();
    public ClientPropertyCollection WritablePropertyRequests { get; private set; }
    public ClientPropertyCollection ReportedFromClient { get; private set; }
}

The reasoning here was 2 fold -
(1) The writable property update requests are usually the interesting bit in ClientProperties. But the previous design promoted the ReportedFropmClient properties to the top-level object. With this change in design, both the "reported" and "requested" properties are now present under their specific accessors.
(2) With everything being a dictionary for node, having the client reported properties under ClientProperties directly makes iterating through the collection difficult. Iterating ClientProperties directly would give you all client reported properties + the writable property requests under a Writable key. With this change in design, you can now iterate over ReportedFromClient and WritablePropertyRequests separately.

  • Rename SubscribeToWritablePropertiesEventAsync to SubscribeToWritablePropertyUpdateRequestsAsync (this matches the WritablePropertyRequests in ClientProperties.)
  • Remove "en-us" from URL links (I've not updated the non-pnp "en-us" links since it would better to update those in master instead).
  • Rename the unit test package from Microsoft.Azure.Devices.Client.Tests to Microsoft.Azure.Devices.Client.Test

@abhipsaMisra abhipsaMisra force-pushed the abmisr/clientPropertiesRenameEtc branch from 7670955 to e044839 Compare July 20, 2021 16:50
@abhipsaMisra abhipsaMisra enabled auto-merge (squash) July 20, 2021 17:31
@abhipsaMisra abhipsaMisra merged commit 35f8f57 into previews/pnpApi Jul 20, 2021
@abhipsaMisra abhipsaMisra deleted the abmisr/clientPropertiesRenameEtc branch July 20, 2021 20:26
@owainc
Copy link

owainc commented Aug 4, 2021

Any idea when this might be released in a preview?

@abhipsaMisra
Copy link
Member Author

Hi @owainc , we are currently working to get a couple of other changes in before we put a release out, which we're targeting to have by the end of this month. Are you waiting for this specific change in particular?

@owainc
Copy link

owainc commented Aug 9, 2021

@abhipsaMisra Not waiting for this specifically, could see it was a breaking change though (a good one) and wanted to get up to date :) End of the month sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants