Tag Info

New answers tagged

2

Well... you can't. Not directly at least - if you could it would have been a major security breach. You can, however, use an embedded-in-page program - like a Flash application or a Java Applet - to run these commands. Take a note there is still some security hurdles you need to jump - Java Applets, for example, need to be signed and granted special ...


0

You are probably looking for TraceSource, as opposed to its older sibling, Trace. It works very similarly, except you create instances of TraceSource with different identifiers. var source = new TraceSource("foo"); source.Listeners.Add(new ConsoleTraceListener()); source.TraceEvent(TraceEventType.Error, 1, "here be dragons"); The instances can be ...


1

I would create a strongly typed array for each value type, and use each array as a pool of potential value holders. Another option, slightly slower, is to use a set of List where each List instance contains a different value types. This is similar to the pooling strategy commonly used for memory allocation optimization. A List, or your own array, will have ...


0

What you want pretty much sounds like WPF´s dependency properties and attached properties. You may want to look into the design of System.Windows.DependencyObject as a base class and System.Windows.DependencyProperty as the property class. It does involve a bit of overhead, but is really quite flexible.


1

You have to have a bit of context here: I think the main point missing is that this was a pre C#2.0 feature, which means it's a feature that came before nullable types. The page that describes the overloading of the 'true' operator is clearly geared towards the direction of having a nullable boolean without using a nullable type as support. But there are ...


3

Please allow me to clarify things in regards to async/await. When await is encountered the underlying state machine allows control to be returned immediately. Then, when the awaited call is completed, the underlying state machine allows execution to resume at the line after the awaited call. Therefore, the async block is not blocked nor is it waiting for ...


1

A library is supposed to be a black box with a clean domain-specific API. There's no problem with using any tools or patterns you need inside a library, including DI, as long as it does not leak to the client and constrain him in some way. If there's a need to provide extensibility or library configuration changes, it still can be done without sharing a ...


2

Your DRM scheme is based on security by obscurity. It won't take long until people figure out that your custom video format is just a zip-archive and will extract it with 7zip to get the actual file. You could make it a bit harder by encrypting it, but people will also be able to figure these out and obtain your decryption key by reverse-engineering your ...


1

In response to that last comment of yours, someone has actually coined this difficulty as the "Analog Hole". You cannot simultaneously show something to a user, and hide it from their computer's access. http://en.wikipedia.org/wiki/Analog_hole It still might be possible to A) Provide basic download difficulties to at least make it very difficult for the ...


1

First, I would ensure each entity has reference to DomainRaiser. It would be best if this was set when the entity is created or materialized in repository. Each user/request context would have it's own instance which would then be injected into all entities, that are worked by the context. I don't know what Repository/UnitOfWork implementation are you using, ...


2

Wow, there are sure a lot of extraneous statements in your question. I think I can boil it down to: How do I update documents in RavenDB? That question already has been answered on StackOverflow here and here, which will point you at RavenDB's Patching API. There's also extensive documentation available here, and you can even kick off a bulk patch ...


-2

The beauty of external libraries is that they should do what ever it is they say they would do, while exposing a simple, straight forward interface. How ever complex it actually is to do it, should not be the business of the developer who implements it. If DI actually makes the work of the API developer less complex, then it makes 100% sense to use it, as ...



Top 50 recent answers are included