- remotingprobe_src.zip
- bin
- MessageProbe
- RemotingAnalyzerStudio
- App.ico
- AssemblyInfo.cs
- bullet.ICO
- call.ICO
- CHECKMRK.ICO
- class.ico
- classname.ico
- computers.ICO
- context.ico
- Delete.Ico
- disable.ico
- enable.ICO
- error.ICO
- exception.Ico
- fnc.ico
- Form1.cs
- Form1.resx
- info.Ico
- location.ico
- method.ico
- msg.ico
- obj
- Debug
- RemotingAnalyzerStudio.exe
- temp
- TempPE
- object.ico
- ping0.ico
- ping1.ico
- process.ico
- processing.ico
- property.ico
- RemotingAnalyzerStudio.csproj
- RemotingAnalyzerStudio.csproj.user
- return.ICO
- retval.ico
- src.ico
- stackdown.ICO
- TIMER.ICO
- unknown.ICO
- urls.ICO
- util.cs
- View.Ico
- warning.ICO
- XMLTree.ico
- zerostack.ico
- RemotingProbe.sln
- RemotingProbeEventClass
- SubscriberProbe
- Test
- bin
- TestHostServer
- TestRemoteObject
- TestWindowsClient
|
//=============================================================================
// The Remoting Probe State class (internal class)
// and IRemotingProbe.
// (C) Copyright 2002, Roman Kiss (rkiss@pathcom.com)
// All rights reserved.
// The code and information is provided "as-is" without waranty of any kind,
// either expresed or implied.
//-----------------------------------------------------------------------------
// History:
// 08/26/2002 Roman Kiss Initial Revision
//=============================================================================
//
using System;
using System.Text;
namespace RKiss.MessageProbe
{
#region classes
public class ProbeState
{
//status (sharable read/write fields)
private volatile bool m_EnableCall = false;
private volatile bool m_EnableReturn = false;
private volatile bool m_EnableError = false;
private volatile bool m_EnableBinary = true;
//signature of the probe (readonly)
string m_name = "";
string m_Id = Guid.NewGuid().ToString();
string m_TimeStamp = DateTime.Now.ToString();
//
public string Name {get { return m_name; }}
public string Id {get { return m_Id; }}
public string TimeStamp {get { return m_TimeStamp; }}
public bool EnableCall {get { return m_EnableCall; }}
public bool EnableReturn {get { return m_EnableReturn; }}
public bool EnableError {get { return m_EnableError; }}
public bool EnableBinary {get { return m_EnableBinary; }}
public ProbeState() {}
public ProbeState(string name, bool call, bool ret, bool err, bool binary)
{
m_name = name;
m_EnableCall = call; m_EnableReturn = ret; m_EnableError = err; m_EnableBinary = binary;
}
public string GetStatus()
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat("call = {0}, return = {1}, error = {2}, binary = {3}",
m_EnableCall, m_EnableReturn, m_EnableError, m_EnableBinary);
return sb.ToString();
}
public void SetStatus(string status)
{
if(status != null)
{
string[] ctrls = status.Split(',');
if(ctrls != null)
{
foreach(string ctrl in ctrls)
{
string[] prop = ctrl.Trim().Split('=');
string name = prop[0].Trim();
string val = prop[1].Trim();
if(name == "call")
m_EnableCall = Convert.ToBoolean(val);
else
if(name == "return")
m_EnableReturn = Convert.ToBoolean(val);
else
if(name == "error")
m_EnableError = Convert.ToBoolean(val);
else
if(name == "binary")
m_EnableBinary = Convert.ToBoolean(val);
else
if(name == "All")
{
m_EnableCall = Convert.ToBoolean(val);
m_EnableReturn = Convert.ToBoolean(val);
m_EnableError = Convert.ToBoolean(val);
}
}
}
}
}
}
#endregion
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.