Korbah
Korbah
CC#
Created by AceChewy on 8/20/2023 in #help
❔ Help with minimising, maximisng and closing a window
You would just set a property on the viewmodel that has your application name and bind to that
46 replies
CC#
Created by stigzler on 7/20/2023 in #help
❔ Help with Dependency Inversion Principle
yeah, I use that quite often with my approach. The option appears if you right click the class declaration You can also easily create methods on a class, and then pull it up to an existing interface
32 replies
CC#
Created by stigzler on 7/20/2023 in #help
❔ Help with Dependency Inversion Principle
for what it's worth, VS has quick actions that allow you to create interfaces from classes in quick actions
32 replies
CC#
Created by schwartzmj on 6/28/2023 in #help
❔ New .NET Core Web API app. Guidelines for setting up authentication & authorization?
Once I've verified the user's credentials using Identity, I build a JWT based on the user's permissions and return it. Then there's middleware that handles verifying the signature of the JWT is valid, and then each controller / method can use the [Authorize] method to limit access. I'm super new to using Identity and JWTs in C# too but it seems to work fine
50 replies
CC#
Created by schwartzmj on 6/28/2023 in #help
❔ New .NET Core Web API app. Guidelines for setting up authentication & authorization?
I've been using ASP.net Identity(I believe this is different than Identity Server, which definitely confused me) to handle authentication. It was a little challenging to learn since the documentation is geared towards MVC projects, but you can use the methods in a web api as well
50 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
This makes sense - I think we should be able to make something work with the information you've given so far. Were you able to find out what source generators are? I believe that solution could make this much simpler
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
My reason for asking is to know whether we need to ignore some fields or not
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
Is it intentional that Subject.DossierId and SubjectAttachment.FileStream are not reflected in the JSON?
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
@Malibloo (so discord will notify you)
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
I think it would be enlightening to see at least 1 object before it has been serialized. It may help to see another example of the JSON required so we can understand how generic you would like the solution
49 replies
CC#
Created by Darkisad on 1/1/2023 in #help
❔ A field initializer cannot reference the nonstatic field, method, or property
it looks like the error isn't in the weapon class but in whatever class is calling new Weapon("Sniper...) - the line of code I replied to
13 replies
CC#
Created by Kaelen on 12/31/2022 in #help
✅ [RESOLVED]It seems that my variables is destroyed after the Awake()
I know very little of Unity, but it looks like PlayerJoined is being called before Awake() in this instance from your log
4 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
@Malibloo hopefully that could give you some ideas - I'm still not 100% sure this is the kind of answer you're looking for
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
You can store the ElementId as a nullable Tuple<string, int> and only write that property if it is not null Fields could be a Dictionary Objects could be an array of the base type
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
Gotcha - from your initial post I thought you had other structures you'd like to be able to handle with your solution. The only time I see an Id outside of the Fields property is in the outermost "Element", the others do not have an Id outside of fields in the example given. You may be able to write a custom converter for a class that could represent the structure you've given
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
I assume there are a limited amount of types or command parameters and you could create building blocks of them to create the end result
49 replies
CC#
Created by Malibloo on 12/30/2022 in #help
❔ JSON Serialization Weird Model
honestly the Element and Fields levels of the heirarchy seem superfluous Its a little hard to suggest anything given the limited amount of information given. You've provided one example of how the data should be sent but I'm not sure how flexible you'd want your solution go be. I'd have to see more of the documentation or more examples to suggest something better if you don't want to use ToString
49 replies
CC#
Created by sergiowatson on 11/22/2022 in #help
❔ ❔ WPF Slider
Like this
<Slider Orientation="Vertical" Height="200" Minimum="0" Maximum="10" Value="0" IsSnapToTickEnabled="True" TickFrequency="1" />
<Slider Orientation="Vertical" Height="200" Minimum="0" Maximum="10" Value="0" IsSnapToTickEnabled="True" TickFrequency="1" />
6 replies
CC#
Created by sergiowatson on 11/22/2022 in #help
❔ ❔ WPF Slider
in XAML, you can try using the IsSnapToTickEnabled and TickFrequency properties
6 replies