Skip to content

Conversation

@MIchaelMainer
Copy link
Collaborator

@MIchaelMainer MIchaelMainer commented Sep 25, 2020

Summary

ODate primitives method return types are returned in an object.
We weren't handling the object which resulted in serialization
exceptions.

modified:   Templates/CSharp/Base/SharedCSharp.template.tt
modified:   Templates/CSharp/Requests/MethodRequest.cs.tt

Generated code differences

microsoftgraph/msgraph-beta-sdk-dotnet#160
microsoftgraph/msgraph-sdk-dotnet#800

Command line arguments to run these changes

# Run against the current typewriter dev branch 
-v Info -m https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml -o dotnetbeta_old -l CSharp -g Files -e beta

# Run against this typewriter branch 
-v Info -m https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml -o dotnetbeta_new -l CSharp -g Files -e beta

Links to issues or work items this PR addresses

The generated changes are supported by these changes: microsoftgraph/msgraph-sdk-dotnet-core#135

ODate primitives method return types are returned in an object.
We weren't handling the object which resulted in serialization
exceptions.

	modified:   Templates/CSharp/Base/SharedCSharp.template.tt
	modified:   Templates/CSharp/Requests/MethodRequest.cs.tt
zengin
zengin previously approved these changes Sep 25, 2020
zengin
zengin previously approved these changes Sep 30, 2020
zengin
zengin previously approved these changes Oct 6, 2020
// GetMethodRequestPrimitiveReturnTypeString() in SharedCSharp.
var tempReturnType = GetMethodRequestPrimitiveReturnTypeString(returnEntityType);

// These magic strings represent types in M.G.C. If the return
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: What it represents is clear from the context, but having it full string may help in a future search for this comment.

Suggested change
// These magic strings represent types in M.G.C. If the return
// These magic strings represent types in Microsoft.Graph.Core. If the return

nikithauc
nikithauc previously approved these changes Oct 6, 2020
@MIchaelMainer MIchaelMainer dismissed stale reviews from nikithauc and zengin via af8a21f October 6, 2020 06:16
@MIchaelMainer MIchaelMainer merged commit 3219c92 into dev Oct 6, 2020
MIchaelMainer added a commit that referenced this pull request Oct 6, 2020
ODate primitives method return types are returned in an object.
We weren't handling the object which resulted in serialization
exceptions.

	modified:   Templates/CSharp/Base/SharedCSharp.template.tt
	modified:   Templates/CSharp/Requests/MethodRequest.cs.tt
        modified:   Templates/CSharp/Requests/IMethodRequest.cs.tt
@MIchaelMainer MIchaelMainer deleted the fix/methodWithODataPrimitiveReturnValue branch October 6, 2020 06:32
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.

4 participants