Files
ssh.net/Renci.SshClient/Renci.SshNet/Session.NET40.cs
T
olegkap_cp da854b711a Apply 10278 patch and make some minor corrections
Fix Renci.SshNet.NET35 project and make it compilable
Add Tests for .NET 3.5
2011-08-26 12:52:20 +00:00

49 lines
1.4 KiB
C#

using System.Threading.Tasks;
using System.Linq;
using System;
using System.Net.Sockets;
using System.Net;
using Renci.SshNet.Messages;
using Renci.SshNet.Common;
using System.Threading;
using Renci.SshNet.Messages.Transport;
namespace Renci.SshNet
{
/// <summary>
/// Provides functionality to connect and interact with SSH server.
/// </summary>
public partial class Session
{
partial void HandleMessageCore(Message message)
{
this.HandleMessage((dynamic)message);
}
partial void ExecuteThread(Action action)
{
Task.Factory.StartNew(action, TaskCreationOptions.LongRunning);
}
partial void InternalRegisterMessage(string messageName)
{
lock (this._messagesMetadata)
{
Parallel.ForEach(
from m in this._messagesMetadata where m.Name == messageName select m,
(item) => { item.Enabled = true; item.Activated = true; });
}
}
partial void InternalUnRegisterMessage(string messageName)
{
lock (this._messagesMetadata)
{
Parallel.ForEach(
from m in this._messagesMetadata where m.Name == messageName select m,
(item) => { item.Enabled = false; item.Activated = false; });
}
}
}
}