CloudEventAttribute should implement equality operators
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia individuando CloudEventAttribute, CloudEvent.GetPopulatedAttributes() e il metodo esistente che recupera un attributo. Esamina i test nelle vicinanze e la documentazione sugli attributi di estensione, quindi definisci il comportamento previsto per la ricerca o l’uguaglianza in base all’issue. Il lavoro è completato quando i chiamanti possono identificare in modo affidabile un attributo facoltativo senza dover gestire scomodamente i KVP e sono presenti test per i nomi mancanti e ripetuti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CloudEvent.GetPopulatedAttributes() returns an IEnumerable<KeyValuePair<CloudEventAttribute, object>> which is actually a bit odd. You'd think it would be usable as a dictionary, but I'm guessing there might be a cause where the same attribute names appear more than once, but in my case, I know they won't, so I tried to create a dictionary from it, but unfortunately, since the Key is CloudEventAttribute, indexing it requires equality operators. Even if I simply search the list of KVPs, it makes it awkward to find an attribute that may or may not exist (SingleOrDefault for example, because default is a KVP with null values), so I think I have to loop on it the old fashioned way.
I find the interface in general to be very awkward, but I think some comparison operators would be helpful, or even a helper method that can grab the attribute and/or value by name. There's already a method to get the attribute, there's just no value in it; it's only the name. Maybe there's some other incantation I'm not seeing; the documentation on extension attributes is lacking in general.
- Lingua principale
- C#
- Stelle
- 334
- Fork
- 88
- Merge medio
- 6m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudevents/sdk-csharp
-
Include specversion in CloudEvent.GetPopulatedAttributesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
cloudevents/sdk-csharp#373 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cloudevents/sdk-csharp#324 · 1 commento ·
-
Allow users to signal whether extensions are requiredForse di nuovo libera @jskeet l’ha presa 518 giorni fa e non c’è nessuna pull request aperta. Aperta
cloudevents/sdk-csharp#321 · 4 commenti · 1 assegnatario ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cloudevents/sdk-csharp#310 · 6 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
cloudevents/sdk-csharp#308 · 5 commenti · 1 reazione ·
Tutte le issue di cloudevents/sdk-csharp
Issue simili
-
[i18n] 安装实例完成后的成功提示未正确本地化Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
PCL-Community/PCL-CE#3658 ·
I maintainer di solito rispondono entro 1 giorno
-
Deploy & Patch-issues opprettes ikke: create-pnd-issues.yml har feilet hver uke siden 2025-09-08Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Altinn/altinn-auth#4359 ·
I maintainer di solito rispondono entro 1 giorno
-
type/automation type/tech-debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
High-DPI fixes for release/1.3: editor toolbar icons and Color Picker layout (patch included)Apertano-stack-trace
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
S: Untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
project-wayfarer/wayfarer-14#1650 ·
I maintainer di solito rispondono entro 2 giorni