hostcontext.cs
来自「Agent技术在智能交通中的应用」· CS 代码 · 共 40 行
CS
40 行
using System;
using System.Collections.Generic;
using System.Text;
namespace MobileAgents
{
public class HostContext : MarshalByRefObject
{
#region Static Members...
private static HostContext _instance = null;
internal static void Initialize(HostContext contextForAppDomain)
{
_instance = contextForAppDomain;
}
public static HostContext Current
{
get { return _instance; }
}
#endregion
#region Instance Members...
private string _location = string.Empty;
private HostContext() { }
public HostContext(string currentHostLocation)
{
_location = currentHostLocation;
}
public string Location
{
get { return _location; }
}
//TODO: Add any other properties or services to expose
// for hosted agents!
#endregion
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?