Skip to content

Conversation

@xperiandri
Copy link
Contributor

Merge after #18

@xperiandri
Copy link
Contributor Author

@Tarmil any remarks?

open System

[<AttributeUsage(AttributeTargets.Parameter ||| AttributeTargets.Field)>]
type internal TimeSpanConstantAttribute(miliseconds) =
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing this attribute is supposed to provide the default value for an optional parameter, but I can't get it to work on toy examples, nor find any documentation about using custom operators for this.

static member UseHotReload(this: IEndpointRouteBuilder, [<Optional; DefaultParameterValue(HotReloadConstants.DefaultUrl)>] urlPath: string) : unit =
this.ServiceProvider.GetService<Watcher>().Start()
let urlPath = defaultArg urlPath HotReloadSettings.Default.Url
let urlPath = urlPath
Copy link
Member

Choose a reason for hiding this comment

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

Might as well remove this line altogether.

@Tarmil Tarmil force-pushed the master branch 2 times, most recently from 57b6fba to f54a66b Compare December 8, 2024 15:34
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.

2 participants