Comments (5)
On DataContractAttribute
Stride: alias == System: name
System: namespace
isnt implemented in stride but it could be
System: IsReference
doesnt exist in stride
System: IsInherited
doesnt exist in system
DefaultDataMemberMode
is only used 3 times and can be removed in obsoletion path
so the datatypes would be there for datacontract.. being generous isreference and isinherited can somehow be interpreted the same way but if you use system datacontract you have to use DataMember of system as well, so you dont clash
in DataMember you have
DataMemberMode
= required , cant be removed
order
= exists on both
name
= exists on both
mask
= used for excluding members based on the mask ( dont know exactly ), may be dropped? dont know
with C#13 i think a new feature comes to extend existing classes with properties, this may also be available for annotations, so just extend the datamember attribute of system by mask and datamember mode and it could work
[NotNull] can be yoinked, inconsistenly used accross the engine and is replacable by nullable
from stride.
after thinking about it datastyle konstruktor is also required for properties so... only the scalarstyle konstruktor can be removed
from stride.
i think a new feature comes to extend existing classes with properties
If you're referring to extension types, this wouldn't help in our case:
Instance extension types cannot hold state. For example, they canβt include fields. They can access state on the underlying type or in another location.
https://devblogs.microsoft.com/dotnet/dotnet-build-2024-announcements/
Let's say that's fine, I wonder how safe it is to just adopt it like so, would feeding strides' types to microsoft's DataContractSerializer
even work out of the box ? What about the other way around, random libraries that have some of their types annotated with microsoft's DataContract
, how would those be serialized through our serialization system ?
Renaming that attribute should be fairly painless though, just have to mark the current one as obsolete and users can just mass replace DataContract
with whatever name we thought of for the new one.
from stride.
goind towards incremental source generator inherited doesnt work anymore as each class needs the attribute as incremental source generators work on syntax not on semantic
we can still have the inherited bool to make a code fixer which is not relying on syntax that much as incremental source generator to automatically add the attribute which may be the better solution
sad that the new feature doesnt allow states :(
from stride.
DataStyle(ScalarStyle) constructor can be removed
the scalar style of a string in yaml can be automatically handled by the serializer depending on the context so this is somewhat overcomplicating the thing
if you have multi line string => literal
if you have spaces or special tokens/reserved words ( like !!null ) => go double quoted
if you have a char with a special token => go single quoted
if you have double line breaks => go for folded instead of literal.. which means folded and literal can be moved into 1 thing... even you can go so far to not support folded at all as literal is anyway doing the same
this way datastyle(DataStyle) is the only constructor that is needed => datastyle can be limited to classes only and properties can be removed, simplifies annotations by reducing its range of usage
by not auto handling this you receive bugs like with naming a scene #MainScene so the reference is written as 123545:#MainScene now its a comment , it should be written as "12345:#MainScene" so its also more error prone if the enduser has to handle it
the usage of the constructor in stride is afaic once... in a test...
from stride.
Related Issues (20)
- DebugPhysicsShapes not rendering in layers other than group0+ flickering
- Compilerservices File Scoped doesnt work
- [Docs] README.md updates
- Editor Scene Hierarchy Memory Leak HOT 8
- Projects with graphics level 9 1 and level 9 graphics compositor crash at startup HOT 6
- Overflow Exception when getting SoundInstance position HOT 3
- Current Stride.Native.targets file prevents from using modern NET MSBuild
- Can't load assets when the root asset/folder name has # prefix HOT 4
- OpenGL ES 2 support dropped without official notice
- Potential skin/bone animation bug HOT 1
- Rename "Down" input methods for clarity from "Pressed" (e.g. IsKeyDown, IsMouseButtonDown etc.) HOT 5
- Android crashes when clicking into EditText UI control HOT 1
- Setup VirtualButtons, configs and config sets from the editor
- Proposal - Migrate PVRTC in favor of more modern ASTC or other compression format HOT 1
- Add ExpDecay function for framerate independent damping HOT 2
- PublishSingleFile removes icon HOT 5
- Linux build does not include necessary library (freetype) HOT 1
- [Docs] GraphicsCompositor - Add XML summary HOT 1
- FBX Import Child Of Modifier is ignored HOT 1
- FBX Bone Start is root for bone links HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stride.