I use RhinoMocks for a very simple test (I have to say I'm a beginner here). I tried to mock my object like this
var mock = MockRepository.GenerateMock<MyClass>();
create a helper stub :
var stubLinkedObject = MockRepository.GenerateStub<MyClass>();
then execute some logic which should call the method AddLink of the class MyClass ...
Dear Gurus
I had a requirement to allocate the resource to number of threads so i used semaphores to handle all this then i realized that semaphore are used in case of Interprocess locking of resources. I googled and found some implementation of In-Process Semaphore and used that class but it has some weird bugs.
Now my question is Sh...
In TableLayoutPanel, I ve 4 column, in 2 column I set two user controls like dockble, if i dock the 2nd usercontrol after the 1st control, the scroll bar(Auto scroll is true on tablelayoutpanel) contiously decreased.How i set this normally.
...
Hi,
Could you please give me some tips/web site regarding a software architecture to allow a .Net application to be ready for add-in (allow third partners to develop add-in to plug on top of application)
Regards
...
I tried using System.Console.In.ReadToEnd (for code-golf, as it happens), but I can't work out what the key sequence is to get it to return from the console.
...
I have a page that do some validations in Page_Load method
According this validation i need to block the access to this page.
Example:
protected void Page_Load(object sender, EventArgs e){
if (!IsPostBack)
{
if (MyValidation)
{
// The page is loaded an de user get access
}
else
{
// Here, i need to block th...
hi,
in my application i want to display the duration time of the video ( that is time of the video) in asp.net
...
Hi All,
I am wanting to find out whether or not it is possible to inject JavaScript into the .NET WebBrowser control from outside the running application?
Thanks
STW
Clarification: I am wanting to know if someone can get hold of the internal process of the wrapped components and manually insert what they like into the "browser" por...
We have a .net 2008 application which uses two dll's to remote to a server to get information. the returned object. One of the properties of this object is an enum which is held in a third dll.
For some reason when we build the third dll is not being added, despite the fact i have now included all three dll's in the solution.
at runtim...
I have created a dataset in a project in visual studio that points to a table in my database
and then bound a datagridview control to it.
Now I open the database and add another column to the table in the database.
Then i open the dataset and update it's configuration to include the change.
Then i want to update the datagridview, but I...
Is it possible to add a Finalizer to a CodeDom generated class (other than using CodeSnippetTypeMember)?
I couldn't find any information about it on MSDN.
...
I'm currently setting up a new project, and I have run into a few things, where I need a little input.
This is what i'm considering:
I would like a generic repository
I don't want to return IQueryable from my repository.
I would like to encapsulate my queries in specifications.
I have implemented the specification pattern
It needs to ...
I'm starting on this book for the MCTS Exam 70-562 and i'm wondering if there are people around that can describe their feeling on how to work through this book most efficiently.
Is the content in this book hard to understand? Is it a book that just requires you to do the excersises etc and then go for the exam? What are , in your opinio...
StyleCop is an awesome little add-on for visual studio. But it doesn't show you live hints or provide any automated fixes.
Along comes reSharper and StyleCop for reSharper, this is the ideal solution, however it costs too much.
Is there an open source way to achieve the live code hints and automated fixes for style cop?
Or is reShar...
I have an XML document from which I need to extract a nodeset and add a namespace. So, from a doc I extract this:
<List>
<ListItem>
<SomeData>Here is some text</SomeText>
</ListItem>
<ListItem>
<SomeData>Here is some more text</SomeText>
</ListItem>
</List>
and need to create this:
<my:List xmlsns:my='http://SomeNames...
Hi,
I'm getting some serious weirdness using FileVersionInfo.GetVersionInfo() and was hoping somebody might be able to help.
The basics of the issue is that I am iterating through all the files in a folder calling GetVersionInfo() on each. There are about 300 files. This works ok for all but 2 of the files. For these DLLs I am getting ...
I would like to get number from a string eg:
My123number gives 123
Similarly varchar(32) gives 32 etc
Thanks in Advance.
...
I'm trying to retrieve the version of excel from the registry but I have problems using the
Registry.GetValue(...)
method
The value I am trying to retrieve is in HKEY_CLASS_ROOT\Excel.Application\CurVer
But I do not know what name to put as a parameter in the GetValue method.
I tried :
RegistryKey key = Registry.ClassesRoot;
Registr...
I have a few projects:
A database interface project that defines Thingo (main solution)
A logic project that defines ThingoChooser (plugin solution)
A GUI project that refers to the logic project (plugin solution
A test project that refers to the logic project (plugin solution)
I'm debugging the plugin, so I run the main solution wit...
MSDN says: Gets a unique identifier for the current managed thread.
In what context does "unique" apply?
Is this unique per process?
per AppDomain?
per Machine?
per .NET runtime? (if I have both MS.NET and Mono running )
...