36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.OperationsMgr.Core.App
|
|
{
|
|
//=======================================================================
|
|
public class OpnSessionContext
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
protected OpnSessionContext (ushort index)
|
|
{
|
|
Index = index;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public ushort Index { get; }
|
|
public Opn.Instance Instance { get; protected set; }
|
|
public String InstanceCode { get { return OpnSystem.GetInstanceCode(Instance); } }
|
|
|
|
//-------------------------------------------------------------------
|
|
// Comparison.
|
|
public bool Equals (OpnSessionContext sessionContext)
|
|
{
|
|
if (sessionContext.Index != Index) return false;
|
|
if (sessionContext.Instance != Instance) return false;
|
|
return true;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|