Skip to content

Dotnet Support#36

Open
tconley1428 wants to merge 18 commits into
mainfrom
dotnet_support
Open

Dotnet Support#36
tconley1428 wants to merge 18 commits into
mainfrom
dotnet_support

Conversation

@tconley1428

Copy link
Copy Markdown
Collaborator

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@tconley1428 tconley1428 changed the title Dotnet support work in progress Dotnet Support Jun 26, 2026
@tconley1428 tconley1428 marked this pull request as ready for review June 26, 2026 17:14
@tconley1428 tconley1428 requested a review from a team as a code owner June 26, 2026 17:14
Comment on lines +13 to +29
[GeneratedCode("nex-gen", null)]
public sealed class NexusResult<TOk, TErr>
{
private NexusResult(bool isOk, TOk? ok, TErr? err)
{
IsOk = isOk;
Ok = ok;
Err = err;
}

public bool IsOk { get; }
public TOk? Ok { get; }
public TErr? Err { get; }

public static NexusResult<TOk, TErr> FromOk(TOk value) => new(true, value, default);
public static NexusResult<TOk, TErr> FromErr(TErr value) => new(false, default, value);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a huge deal here and I think we discussed this already, but have you considered moving NexusResult into TemporalSupport? Relevant to Golang since I think we'll need to generate some of our own helper types there too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have to take a look at this one. It doesn't exist in the workflow service I've been paying the most attention to since it is the current application.

Comment on lines +55 to +60
public sealed class Email : NotificationTarget
{
public Email(string value) => Value = value;

public string Value { get; }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason not to use records?

public string? Reason { get; set; }
}

public static partial class TypeShowcaseOperations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Idk if it matters, but I think we can rename this to Operations since it's already in the NexGen.TypeShowcase namespace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And do we want to slap a [GeneratedCode] attribute on here too?

Comment on lines +117 to +130
internal class SetProfileRequest
{
internal SetProfileRequest(string userId, UserProfile profile)
{
UserId = userId;
Profile = profile;
}

public string UserId { get; }
public UserProfile Profile { get; }
}

[GeneratedCode("nex-gen", null)]
public class UserProfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is SetProfileRequest internal while UserProfile isn't?

ConsistencyToken = options.ConsistencyToken,
};
return GetUserAsync(request);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GetUserOptions is identical to GetUserRequest, and this happens everywhere except when you use @nexus.function. Did you want to make the mandatory args of GetUserRequest into positional args so GetUserOptions only includes the options?

Comment on lines +31 to +35
public User UpdateEmail(string email) => throw new NotSupportedException("Resource methods require a bound Nexus client.");

public User Rename(string displayName) => throw new NotSupportedException("Resource methods require a bound Nexus client.");

public void Deactivate(string? reason) => throw new NotSupportedException("Resource methods require a bound Nexus client.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't these methods invoke the operations?

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