You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement chemical quantities including ActivationEnergy, AmountOfSubstance, Concentration, DynamicViscosity, EnzymeActivity, MolarMass, PH, RateConstant, ReactionRate, and SurfaceTension. Update PhysicalDimensions and Units to include new chemical dimensions and units. Mark the Chemical domain as fully implemented in TODO_DOMAINS.md, enhancing the completeness of the quantities implementation.
Copy file name to clipboardExpand all lines: .cursor/rules/derived-cursor-rules.mdc
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,12 @@ When adding XML documentation comments:
243
243
2. Remove the `BaseUnit` property from `PhysicalQuantity` and its interface.
244
244
3. Update `PhysicalQuantity.In()` to use `Dimension.BaseUnit`.
245
245
* When implementing PhysicalQuantity classes, ensure the containing type is one of the parameters in the generic type definition.
246
+
* When creating new quantities, implement the following:
247
+
* Add any necessary dimensions to `PhysicalDimensions.cs`.
248
+
* Add any new units to `Units.cs`.
249
+
* Follow the existing code style and patterns.
250
+
* Include XML documentation comments.
251
+
* Implement mathematical relationships between related quantities.
246
252
247
253
## DEBUGGING
248
254
@@ -319,6 +325,12 @@ When adding XML documentation comments:
319
325
* When encountering CS0108 errors, 'SoundPressureLevel<T>.Create(T)' hides inherited member, add the `new` keyword if hiding was intended.
320
326
* When encountering CS0200 errors, Property or indexer 'PhysicalQuantity<SoundIntensityLevel<T>, T>.Value' cannot be assigned to -- it is read only, make sure you are not trying to assign to a read-only property.
321
327
* When encountering CA1062 errors, In externally visible method 'SoundPressureLevel<T> SoundPressureLevel<T>.FromSoundPressure(SoundPressure<T> soundPressure)', validate parameter 'soundPressure' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null' add a null check for the reference parameter.
328
+
* When fixing CS0704 errors (Cannot do non-virtual member lookup in 'T' because it is a type parameter), add the appropriate generic constraints (e.g., `where T : struct, INumber<T>, IFloatingPoint<T>`).
329
+
* When fixing CA1062 errors (In externally visible method X, validate parameter Y is non-null before using it), add `ArgumentNullException.ThrowIfNull(parameterName)` at the beginning of the method.
330
+
* When a file is missing the standard header, add the following to the top of the file:
331
+
```csharp
332
+
// Copyright (c) KTSU. All rights reserved.
333
+
```
322
334
323
335
## WORKFLOW & RELEASE RULES
324
336
@@ -339,9 +351,4 @@ When adding XML documentation comments:
339
351
* For ease of use, use a single common namespace for all types in the library.
340
352
* SemanticStringValidationExamples can just be built in semantic types where appropriate
341
353
* The built in semantic string types should not need the string suffix.
342
-
* Instead of creating generic built-in types like `Base64String`, use validation attributes like `[IsBase64]`, `[IsGuid]`, `[IsEmailAddress]` etc. that can be applied to domain-specific semantic string types.
343
-
* Validation attributes should be separated into their own files.
344
-
* Instead of creating generic built-in types like `Base6String`, use validation attributes like `[IsBase64]`, `[IsGuid]`, `[IsEmailAddress]` etc. that can be applied to domain-specific semantic string types.
345
-
* The built in semantic string types are too niche or too simple, create a collection of useful builtin semantic string types with appropriate validations, where they aren't already implemented in dotnet, like Uri is.
346
-
* Validation attributes should be separated into their own files.
347
-
* Instead of creating generic built-in types like `Base64String`, use validation attributes like `[IsBase64]`, `[IsGuid]`, `[IsEmailAddress]` etc
0 commit comments