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

Remove doc on DateTime being invalid #402

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Remove doc on DateTime being invalid #402

merged 1 commit into from
Sep 27, 2024

Conversation

kzu
Copy link
Member

@kzu kzu commented Sep 27, 2024

Since when using public visibility, it can be valid since they would be static readonly props with a lambda now.

For example, the following now works just fine:

<Constant Include="TypedTimeSpan" Value="TimeSpan.FromSeconds(5)" Type="TimeSpan" />

And generates:

public static TimeSpan TypedTimeSpan => TimeSpan.FromSeconds(5);

@kzu kzu added the documentation Improvements or additions to documentation label Sep 27, 2024
@kzu kzu enabled auto-merge (rebase) September 27, 2024 05:29
Since when using public visibility, it can be valid since they would be static readonly props with a lambda now.

For example, the following now works just fine:

```xml
<Constant Include="TypedTimeSpan" Value="TimeSpan.FromSeconds(5)" Type="TimeSpan" />
```

And generates:

```csharp
public static TimeSpan TypedTimeSpan => TimeSpan.FromSeconds(5);
```
@devlooped-bot
Copy link
Member

devlooped-bot commented Sep 27, 2024

30 passed 30 passed
30 passed 30 passed
30 passed 30 passed

🧪 Details on macOS Unix 14.6.1

✅ ThisAssemblyTests.ScribanTests.CanRenderModel
✅ ThisAssemblyTests.Tests.CanReadResourceFile
✅ ThisAssemblyTests.Tests.CanUseByteResource
✅ ThisAssemblyTests.Tests.CanUseConstants
✅ ThisAssemblyTests.Tests.CanUseFileConstantInvalidIdentifier
✅ ThisAssemblyTests.Tests.CanUseFileConstantLinkedFile
✅ ThisAssemblyTests.Tests.CanUseFileConstants
✅ ThisAssemblyTests.Tests.CanUseFileInvalidCharacters
✅ ThisAssemblyTests.Tests.CanUseGitBranchConstants
✅ ThisAssemblyTests.Tests.CanUseGitConstants
✅ ThisAssemblyTests.Tests.CanUseHierarchicalMetadata
✅ ThisAssemblyTests.Tests.CanUseInfo
✅ ThisAssemblyTests.Tests.CanUseInfoDescription
✅ ThisAssemblyTests.Tests.CanUseMetadata
✅ ThisAssemblyTests.Tests.CanUseMultilineProjectProperty
✅ ThisAssemblyTests.Tests.CanUseProjectProperty
✅ ThisAssemblyTests.Tests.CanUseSameNameDifferentExtensions
✅ ThisAssemblyTests.Tests.CanUseSemicolonsInConstant
✅ ThisAssemblyTests.Tests.CanUseStringResource
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseTextResource
✅ ThisAssemblyTests.Tests.CanUseTypedBoolConstant
✅ ThisAssemblyTests.Tests.CanUseTypedDoubleConstant
✅ ThisAssemblyTests.Tests.CanUseTypedInt64Constant
✅ ThisAssemblyTests.Tests.CanUseTypedIntConstant
✅ ThisAssemblyTests.Tests.CanUseTypedLongConstant
✅ ThisAssemblyTests.Tests.CanUseTypedTimeSpanStaticProp

🧪 Details on Ubuntu 22.04.5 LTS

✅ ThisAssemblyTests.ScribanTests.CanRenderModel
✅ ThisAssemblyTests.Tests.CanReadResourceFile
✅ ThisAssemblyTests.Tests.CanUseByteResource
✅ ThisAssemblyTests.Tests.CanUseConstants
✅ ThisAssemblyTests.Tests.CanUseFileConstantInvalidIdentifier
✅ ThisAssemblyTests.Tests.CanUseFileConstantLinkedFile
✅ ThisAssemblyTests.Tests.CanUseFileConstants
✅ ThisAssemblyTests.Tests.CanUseFileInvalidCharacters
✅ ThisAssemblyTests.Tests.CanUseGitBranchConstants
✅ ThisAssemblyTests.Tests.CanUseGitConstants
✅ ThisAssemblyTests.Tests.CanUseHierarchicalMetadata
✅ ThisAssemblyTests.Tests.CanUseInfo
✅ ThisAssemblyTests.Tests.CanUseInfoDescription
✅ ThisAssemblyTests.Tests.CanUseMetadata
✅ ThisAssemblyTests.Tests.CanUseMultilineProjectProperty
✅ ThisAssemblyTests.Tests.CanUseProjectProperty
✅ ThisAssemblyTests.Tests.CanUseSameNameDifferentExtensions
✅ ThisAssemblyTests.Tests.CanUseSemicolonsInConstant
✅ ThisAssemblyTests.Tests.CanUseStringResource
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseTextResource
✅ ThisAssemblyTests.Tests.CanUseTypedBoolConstant
✅ ThisAssemblyTests.Tests.CanUseTypedDoubleConstant
✅ ThisAssemblyTests.Tests.CanUseTypedInt64Constant
✅ ThisAssemblyTests.Tests.CanUseTypedIntConstant
✅ ThisAssemblyTests.Tests.CanUseTypedLongConstant
✅ ThisAssemblyTests.Tests.CanUseTypedTimeSpanStaticProp

🧪 Details on Microsoft Windows 10.0.20348

✅ ThisAssemblyTests.ScribanTests.CanRenderModel
✅ ThisAssemblyTests.Tests.CanReadResourceFile
✅ ThisAssemblyTests.Tests.CanUseByteResource
✅ ThisAssemblyTests.Tests.CanUseConstants
✅ ThisAssemblyTests.Tests.CanUseFileConstantInvalidIdentifier
✅ ThisAssemblyTests.Tests.CanUseFileConstantLinkedFile
✅ ThisAssemblyTests.Tests.CanUseFileConstants
✅ ThisAssemblyTests.Tests.CanUseFileInvalidCharacters
✅ ThisAssemblyTests.Tests.CanUseGitBranchConstants
✅ ThisAssemblyTests.Tests.CanUseGitConstants
✅ ThisAssemblyTests.Tests.CanUseHierarchicalMetadata
✅ ThisAssemblyTests.Tests.CanUseInfo
✅ ThisAssemblyTests.Tests.CanUseInfoDescription
✅ ThisAssemblyTests.Tests.CanUseMetadata
✅ ThisAssemblyTests.Tests.CanUseMultilineProjectProperty
✅ ThisAssemblyTests.Tests.CanUseProjectProperty
✅ ThisAssemblyTests.Tests.CanUseSameNameDifferentExtensions
✅ ThisAssemblyTests.Tests.CanUseSemicolonsInConstant
✅ ThisAssemblyTests.Tests.CanUseStringResource
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsIndexedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedArguments
✅ ThisAssemblyTests.Tests.CanUseStringsNamedFormattedArguments
✅ ThisAssemblyTests.Tests.CanUseTextResource
✅ ThisAssemblyTests.Tests.CanUseTypedBoolConstant
✅ ThisAssemblyTests.Tests.CanUseTypedDoubleConstant
✅ ThisAssemblyTests.Tests.CanUseTypedInt64Constant
✅ ThisAssemblyTests.Tests.CanUseTypedIntConstant
✅ ThisAssemblyTests.Tests.CanUseTypedLongConstant
✅ ThisAssemblyTests.Tests.CanUseTypedTimeSpanStaticProp

from dotnet-retest v0.6.3 on .NET 8.0.8 with 💜

@kzu kzu merged commit 6dcc834 into main Sep 27, 2024
11 checks passed
@kzu kzu deleted the dev/timespan branch September 27, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants