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

addresses supporting byte[] in direct methods and making TwinProperties able to be directly converted to json #3340

Merged
merged 38 commits into from Jul 21, 2023

Conversation

patilsnr
Copy link
Contributor

@patilsnr patilsnr commented Jun 15, 2023

addresses supporting byte[] in direct methods and making TwinProperties able to be directly converted to json

API surface diff:

namespace Microsoft.Azure.Devices.Client {
	public class DirectMethodRequest {
+		public byte[] GetPayload()
-               public byte[] GetPayloadAsBytes()
	}

       public class DirectMethodResponse {
+             public byte[] Payload { get; set; }
-             public object Payload { get; set; }
+             public object PayloadAsObject { get; set; }
       }

       public class EdgeModuleDirectMethodRequest {
+             internal byte[] Payload { get; set; }
-             internal object Payload { get; set; }
+             internal object PayloadAsObject { get; set; }              
       }
}

namespace Microsoft.Azure.Devices {
      public class DirectMethodClientResponse {
+           internal byte[] PayloadAsBytes { get; set; }
      }

      public class DirectMethodServiceRequest {
+          public byte[] Payload { get; set; }     
-           public object Payload { get; set; }
+          public object PayloadAsObject { get; set; }   
    }
}

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@rido-min rido-min left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd like to be able to set the DirectMethodResponse payload as bytes, in the ctor or with a property setter.

Right now the Payload only accepts object

Make sure the serialized TwinProperties include the version

Add tests

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@patilsnr
Copy link
Contributor Author

/azp run

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@Azure Azure deleted a comment from azure-pipelines bot Jul 21, 2023
@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3340 in repo Azure/azure-iot-sdk-csharp

@patilsnr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@patilsnr patilsnr merged commit 713d933 into previews/v2 Jul 21, 2023
10 checks passed
@patilsnr patilsnr deleted the npatilsen/previewFeatures branch July 21, 2023 07:05
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.

None yet

4 participants