As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm creating a web-related application and I want to add plugin support to it. But I want the plugin dlls to be restricted from everything except my SaveSettings(), RequestPage() and SendToHost() methods. Any good examples how to do that?
You can require your plugins to implement an interface which contains those three methods. In your code then you would call those methods where it is necessary to apply the plugin functionality.
Of course this will not prevent them from executing code within those methods that is not desirable. This becomes more of a security problem in this case. I can't think of a straightforward way of doing this except to load the plugin assemblies into another AppDomain and set security restrictions on the AppDomain about what they can do. This will also of course complicate how you pass data between your plugin and your code.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was just wondering when is it recommended to make dll's, when your project is over 1000 lines, 5000lines, more? Also should I make dll's for WPF controls that WinForm project uses?
Or maybe when the project has reached some number of classes?
Thanks in advance
This is entirely a matter of personal opinion, but if you're breaking up into projects due to line count or number of classes, you're doing it wrong. you should have a project (and thus a dll) for every high level logical grouping within your solution. you might have a data project, a domain project... etc. if you're going to be reusing code across solutions, then yes, you'll need a dll for that, or a shared project, or something similar.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Would it be classed as bad practise to have a solution called "Importer" and then have several projects called Importer.[projectname]
Imagine project name is like Importer.Model etc.
Is that good or not?
I want to confirm my thoughts with other developers
Thanks
No, it's not bad practice, as long as you choose appropriate names.
Visual Studio will assume that the project name provides the default namespace, so for a project named Foo.Bar you'll have Foo.Bar as your namespace.
This is useful when you're working on a set of libraries that fit under a parent namespace. For example, you might want to use your company name as the first part of the namespace, and the library name for the latter part, e.g. MyCorp.MailLib, MyCorp.ReportsLib, etc.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Other than AWT, Swing, SWT (Java) - are there any good open source Java or C# UI libraries around? In particular, libs intended or at least usable for strategy gaming dev? (The visual appearance of the UI would need to be highly dynamic and easy to re-skin obviously.) Engines or "frameworks" which include this functionality are valid answers as well (of course I even more doubt that those exist).
As far as I can tell - there's not a single thing like this out there. Anyone able to prove me wrong?
Not sure about Java, but for C# I would look at either XNA or Unity to start out with.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I would like to be able to capture screenshots with C++ 'using a lot of compression', and/or more importantly 'uses very few system resources when capturing'. I have been looking for concise, well-written examples, and I think I have found a few. What I've found is that most of the examples are in C# and very few are in C++. I'm sure there's a somewhat simple/common answer, and it's foolish to ask. Why do people use C# instead of C++?
Why do people use C# instead of C++?
Because it's easier.
C++ gives you a lot of control over everything, and with that extra control comes extra responsibility and more work. If you just want to get something done quickly, using C# is usually sufficient.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to generation automatically Resx files for my project, I've heared that there's program which does it.
Can anyone tell me it's name?
The only program I know is Visual Studio. You can easily create your own program by using the ResXResourceWriter class.
As Hans stated, for components such as forms and user controls, you can do this via the "Localizable" property. For other ".resx" files, you can easily create your own localized ".resx" file but it needs to be properly named (you can read up on this - Google for "satellite assemblies" for starters). If your goal is dealing with translations in general however, then unless your app is very small, this approach is difficult, tedious and error-prone (trying to track changed strings on your own for instance, whose existing translations have become obsolete). There are 3rd-party packages that can help you however, and I'm the author of one of them (in the interest of full disclosure). See http://www.hexadigm.com.