You are passing around Dictionary<K,V> across pages and accessing its values using a string literal. Is there any way I could solidify this "string" literal so that it's safe for refactoring?
I have in mind is storing a constant string into the receiving page but it seems to be less intuitive.
ASP.NET Core is catching on, I think, mostly because it can run on .NET Framework as well as on .NET Core, so you can switch to it without switching your entire runtime environment.
Personally, It think it's definitely a step up from ASP.NET WebApi 2 with a lot of improvements.
@Proxy The oAuth provider should redirect the browser to a URL on your app, as defined in your app registration. That URL will be redirected with the token as part of the query string.
You are passing around Dictionary<K,V> across pages and accessing its values using a string literal. Is there any way I could solidify this "string" literal so that it's safe for refactoring?
@Wietlol If some method I have to adapt to the new parameter of my new method isn't used a single time, I will ask somebody if I can remove it. For example.
Look, you either stop using Prism, add a pull-request to change how Prism works, or use the framework in the best way possible, which means using constants for your standard, commonly used keys.
But to make the 90% of usages easier to refactor and harder to accidentally mistype, create a simple static PageStateKeys with consts in it for the keys that are commonly used.
@Wietlol Methods with 1 reference arent grey, even if it's their own recursive reference. Yes I know, it get's a warning saying its only call is by itself. Still. Also, when there are several references, you get an overview of how often it's being used. 6 references? I'll refactor that. 90? Hell no.
@nyconing *their answers are the same Possession with "their"
Depends. jetbrains offers annotations telling the analyzer "this method/property is part of the API" called [ImplicitelyCalled], but yxou have to install Jetbrains.Annotations for that. If you just build a library you're gonna publish via nuget, you can't know where it'll be referenced.
Depend on programs, but item9 will be ignored? Or program did consistency check and throw Exception, but in this case, items=8 stored item count are redundant.
I've always thought that referring to the syntax of a language was the same as referring to the semantics of a language. But I've been informed that apparently that's not the case. What's the difference?
Our QA has detected a bug: when rotating the Android device (Droid Turbo), the following RecyclerView-related crash happened:
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 2(offset:2).state:3
To me it looks like an internal error inside RecyclerView, as I c...
@nyconing That's a specific case, but I think @ThomasWeller is asking about how to refer to data that is syntactically valid, but still contains invalid data, in general.
So I'd say it's "semantically invalid". Just like trying to deserialize a JSON representation of an object that doesn't contain the right fields - it's syntactically valid JSON, but it's not, semantically, the object you want it to be.
@ThomasWeller That's just a question of scope. Each line is semantically correct, but the whole file isn't semantically correct - it specified an item count that isn't true.
I have an interface and a class as follows,
public interface IEventStoreRepository<T> where T : Entity
and class
public class EventStoreRepository<T> : IEventStoreRepository<T> where T : Entity, new()
i have configured in the web.config as follows,
<register type="IEventStoreRepository[Ent...
Speaking of RegEx, if anyone wants a challenge, tell me what on Earth this does: (?i)^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$
What else, except a very specific domain problem, could such a conplicated solve?
Also: How do I correctly put a SecureString into a Database, hashed? DO I really need to get the plaintext string and hash that? That's not the point of having a SecureString in the first place.
foreach (int id in ids) { Sql($"DELETE FROM Table WHERE Id = {id}"); } Or build a string with a bunch of OR statements instead of executing a million delete statements on their own. No?
I have no context for what cmd is, but from what I can see there it looks like you build a command and then run it, repeatedly... Which doesn't make much sense if it equates to something like this.
One would think you would add parameters in the loop before executing the query once.