rastrup / PipelineComponentWizard

https://marketplace.visualstudio.com/items?itemName=kristianrastrup.PipelineComponentWizard
0 stars 0 forks source link

Allow numbers in class name #1

Open MartinBring opened 2 years ago

MartinBring commented 2 years ago

Would it be possible to allow a class name containing numbers? Starting with numbers might not be allowed, but elsewhere should be ok. In .Net anyway :)

rastrup commented 2 years ago

Adding classes with digits is already possible. THe default class name is PipelineComponent1 and that works just fine.

MartinBring commented 2 years ago

Hmm, strange. If I name it INT013.X.Y I get a validation error and the Next button is gray.

Kind regards Martin


From: Kristian Rastrup @.> Sent: Tuesday, December 28, 2021 1:13:15 PM To: rastrup/PipelineComponentWizard @.> Cc: MartinBring @.>; Author @.> Subject: Re: [rastrup/PipelineComponentWizard] Allow numbers in class name (Issue #1)

Adding classes with digits is already possible. THe default class name is PipelineComponent1 and that works just fine.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frastrup%2FPipelineComponentWizard%2Fissues%2F1%23issuecomment-1002065121&data=04%7C01%7C%7C0ac21aa74dbe437c4d3108d9c9fb6de8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762903983826265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=2ZI4e96FGCLA46bqefF3GFjLwNpvf7YkFggxCOVTTnU%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADYLH337MNNML2PKAIHFLSLUTGSVXANCNFSM5K33NOEA&data=04%7C01%7C%7C0ac21aa74dbe437c4d3108d9c9fb6de8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762903983826265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=VKE1NVmcNXLsUhkbPGqq%2F%2B7Fys5lVhFeWvLeoYzRuWA%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C0ac21aa74dbe437c4d3108d9c9fb6de8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762903983826265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FOy%2BlKV936l5qU9c5hCbzb5ws%2BCN6QfgWLiG0smE7rQ%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C0ac21aa74dbe437c4d3108d9c9fb6de8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762903983826265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4akclX4cyn3R%2Bb0bgZtMj4%2Bi1x91Qfy5qqS2hhMTc%2BM%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

rastrup commented 2 years ago

Dots are not allowed in a class name in the wizard not in general.

MartinBring commented 2 years ago

Sorry, my mistake. I meant Component Namespace... :)

Kind Regards Martin


From: Kristian Rastrup @.> Sent: Tuesday, December 28, 2021 2:00:39 PM To: rastrup/PipelineComponentWizard @.> Cc: MartinBring @.>; Author @.> Subject: Re: [rastrup/PipelineComponentWizard] Allow numbers in class name (Issue #1)

Dots are not allowed in a class name in the wizard not in general.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frastrup%2FPipelineComponentWizard%2Fissues%2F1%23issuecomment-1002094217&data=04%7C01%7C%7C9cc932cf5e4142487a1308d9ca020cab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762932419519098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=XmwBpzWFY3m7jKI4xzV9ooGS6NDinUrtcn2%2FRJzQvD4%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADYLH32X3JYXEWS6PXXIRM3UTGYHPANCNFSM5K33NOEA&data=04%7C01%7C%7C9cc932cf5e4142487a1308d9ca020cab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762932419519098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5OEZu9rdXI0PbzLiyJpBOLOdNU7BJzyqLR2G3wFoeBU%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C9cc932cf5e4142487a1308d9ca020cab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762932419519098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sykHiC7BSgvcpPTqubS%2FwpMKrt0GYxl1aRB0j7NTY7E%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C9cc932cf5e4142487a1308d9ca020cab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637762932419519098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0JuGSV2vBSdae6EHY2daeRLpCEnavLXfAZCTiL%2F0ye4%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

rastrup commented 2 years ago

The pattern matching is all regex based. The current regex for namespaces is "(?i)^([a-z].?)*$" The one problem is that each name in the namespace (name1.name2.name3) must start with a letter, so "name1.name2" is valid but "name1.2name" is not valid. If i get a better regex expression i can fix this. Other than that it is possible to alter the namespace after creation so this is more nice to have.

MartinBring commented 2 years ago

Thank you for taking your time in times of Christmas :)

RegEx isn't my area of expertise, but with your samples INT013.abc.def should be valid, shouldn't it? But when I tried that I got a validation error.

Or can it only be when digit/number after the characters?

Kind regards Martin


From: Kristian Rastrup @.> Sent: Tuesday, December 28, 2021 5:44:10 PM To: rastrup/PipelineComponentWizard @.> Cc: MartinBring @.>; Author @.> Subject: Re: [rastrup/PipelineComponentWizard] Allow numbers in class name (Issue #1)

The pattern matching is all regex based. The current regex for namespaces is "(?i)^([a-z].?)*$" The one problem is that each name in the namespace (name1.name2.name3) must start with a letter, so "name1.name2" is valid but "name1.2name" is not valid. If i get a better regex expression i can fix this. Other than that it is possible to alter the namespace after creation so this is more nice to have.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frastrup%2FPipelineComponentWizard%2Fissues%2F1%23issuecomment-1002191150&data=04%7C01%7C%7Cd51a3d86bcca40a97cd408d9ca214672%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763066525391411%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6jMowIxVx5wgGtbUdXReFOGatJouH9vJ12vRZZn1xJU%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADYLH32D66HB2BD3I3MIXLTUTHSNVANCNFSM5K33NOEA&data=04%7C01%7C%7Cd51a3d86bcca40a97cd408d9ca214672%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763066525401402%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4ATOEXbpKToZchDjdfGB69qTWRS8GxkCXxUGXfKw128%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cd51a3d86bcca40a97cd408d9ca214672%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763066525411402%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=kSL7c89xkhBcy%2F9ldLFxGTsd%2FBiJhl%2FKTPwmt1X2sHk%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cd51a3d86bcca40a97cd408d9ca214672%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763066525411402%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9EMiGqH0ZdPNs3kg0GAslfIYB5XLlr%2B5aj%2Bd9qevqwU%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

rastrup commented 2 years ago

Your namespace should be valid in a C# context, but the regex filter in the Pipeline wizard is more specific because creating a regex filter that allows for your example is an edge case. Most namespace I have seen are without numbers.

MartinBring commented 2 years ago

Thanks again for quick answer.

The reason we're naming like this is because one company's widely spread naming convention have become kind of defacto standard in Sweden :)

It's not that big deal, but allowing any amount of numbers at the of each part in the namespace would be nice.

Kind regards Martin


From: Kristian Rastrup @.> Sent: Tuesday, December 28, 2021 7:04:57 PM To: rastrup/PipelineComponentWizard @.> Cc: MartinBring @.>; Author @.> Subject: Re: [rastrup/PipelineComponentWizard] Allow numbers in class name (Issue #1)

Your namespace should be valid in a C# context, but the regex filter in the Pipeline wizard is more specific because creating a regex filter that allows for your example is an edge case. Most namespace I have seen are without numbers.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frastrup%2FPipelineComponentWizard%2Fissues%2F1%23issuecomment-1002222376&data=04%7C01%7C%7C91236d91cc9345192f9208d9ca2c8ec2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763114986573448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hBLsD4lGIpUzlVE8b2merkIC3WLSgmuTBFQ0%2BE%2FYXBU%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADYLH36I67PLSG2BLYBFJDTUTH34TANCNFSM5K33NOEA&data=04%7C01%7C%7C91236d91cc9345192f9208d9ca2c8ec2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763114986573448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xyQ6onBkmi8%2BayT8Ka6iREd1H3S1yzNSFdYDb8gUSmI%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C91236d91cc9345192f9208d9ca2c8ec2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763114986573448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dcypsQ%2BW%2BxWPkGf5Qadrk%2FrUvc2UK9z%2Ftp%2FaWOSt5nM%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C91236d91cc9345192f9208d9ca2c8ec2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637763114986573448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=p%2ByePVh5m7eZBu9d7ewVOALJjwv8qCSlUGnrZ1V1rV4%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>