Design a site like this with
Get started

Expect for .NET 2.0.0-rc released

I’ve just uploaded to NuGet Expect for .NET 2.0.0-rc. It’s version 2.0.0 release candidate. Here is description how to install prerelease package: link. Give it a try and let me know what you think. All feedback is welcome 🙂

The 2.0.0-rc version contains a few changes (some of them are not backward compatible):

  • changed namespace name
  • replaced timeout getter/setter methods with property
  • updates in build script

Details below.

Changed namespace name

Because of the same namespace and class name the Spawn method had to be called with both namespace and class name:

using Expect;

// CUT!


To avoid this strange syntax I changed namespace name to ExpectNet. Now the Spawn method can be called:

using ExpectNet;

// CUT!


 Replaced timeout getter/setter methods with property

Matt Tuttle (thanks!) suggested this change in comment:

I agreed with this so I replaced the methods SetTimeout and GetTimeout from Session class with Timout property. Now code is more C#-ish 🙂

So instead of writing:

ISession spawn = Expect.Spawn(new ProcessSpawnable("cmd.exe"));

You should write:

ISession spawn = Expect.Spawn(new ProcessSpawnable("cmd.exe"));
spawn.Timeout = 5000;

Updates in build script

Those changes are neutral from coding point of view.

The build scripts were updated to handle spaces in file paths in correct way.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: