本文整理汇总了C#中System.Current类的典型用法代码示例。如果您正苦于以下问题:C# Current类的具体用法?C# Current怎么用?C# Current使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Current类属于System命名空间,在下文中一共展示了Current类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WeatherModel
public WeatherModel(ForecastIO.ForecastIOResponse forecast)
{
this.currentWeather = new Current(forecast);
this.day0 = new Daily(forecast, 0);
this.day1 = new Daily(forecast, 1);
this.day2 = new Daily(forecast, 2);
}
示例2: peerConnected
public override void peerConnected(string peerId, PeerAccessLevel peerAccessLevel, ObjectPrx peerProxy, Current current)
{
Trace.TraceError("TerkUserServant.peerConnected()" + current.ToString());
Trace.TraceError("The peer [" + peerId + "|" + peerAccessLevel + "|" + Util.identityToString(peerProxy.ice_getIdentity()) + "] just connected to me.");
helper.peerConnected(peerId, peerAccessLevel, peerProxy, current);
}
示例3: instantiateSoldier
public override VSSoldierPrx instantiateSoldier(Current current__)
{
Identity myId = VSNetworkManager.communicator().stringToIdentity(System.Guid.NewGuid().ToString());
VSSoldierI soldierI = new VSSoldierI();
VSNetworkManager.Adapter.add(soldierI, myId);
return VSSoldierPrxHelper.checkedCast(VSNetworkManager.Adapter.createProxy(myId));
}
示例4: getDateTimeValue
public override void getDateTimeValue(out int year, out short month, out short day, out short hour, out short minute, out short second, Current __current)
{
year = this.year;
month = this.month;
day = this.day;
hour = 0;
minute = 0;
second = 0;
}
示例5: name
// Slice name() operation.
public override string name(Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
return _name;
}
}
示例6: read
public override string[] read(Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
return _lines;
}
}
示例7: write
public override void write(string[] text, Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
_lines = new string[text.Length];
text.CopyTo((string[])_lines, 0);
}
}
示例8: createBoxModule
/// <summary>
/// Method createBoxModule
/// </summary>
/// <returns>A Ferda.Modules.BoxModulePrx</returns>
/// <param name="__current">An Ice.Current</param>
public override BoxModulePrx createBoxModule(Current __current)
{
if (_destroy)
{
throw new Ice.ObjectNotExistException();
}
Ice.Identity boxModuleIdentity = Ice.Util.stringToIdentity(Ice.Util.generateUUID());
PropertyBoxModuleI boxModule = new PropertyBoxModuleI(myProxy, this.propertyClassIceId, this.propertyFunctionsIceIds, __current.adapter, boxModuleIdentity, valueFromPrx, defaultValue);
BoxModulePrx boxModulePrx = boxModule.MyProxy;
string boxIdentity = Ice.Util.identityToString(boxModulePrx.ice_getIdentity());
this.boxModules[boxIdentity] = boxModule;
return boxModulePrx;
}
示例9: createBoxModuleFactory
/// <summary>
/// Method createBoxModuleFactory
/// </summary>
/// <returns>A Ferda.Modules.BoxModuleFactoryPrx</returns>
/// <param name="localePrefs">A string[]</param>
/// <param name="manager">A Ferda.ModulesManager.ManagersEnginePrx</param>
/// <param name="__current">An Ice.Current</param>
public override BoxModuleFactoryPrx createBoxModuleFactory(String[] localePrefs, ManagersEnginePrx manager, Current __current)
{
PropertyBoxModuleFactoryI boxModuleFactory = new PropertyBoxModuleFactoryI(propertyClassIceId,
propertyFunctionsIceIds,
myProxy,
localePrefs,
defaultValue,
valueFromPrx,
__current.adapter,
settingModuleIdentifier);
this.reaper.Add(boxModuleFactory.MyProxy, boxModuleFactory);
return boxModuleFactory.MyProxy;
}
示例10: destroy
public override void destroy(Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
c.adapter.remove(id());
_destroyed = true;
}
_parent.removeEntry(_name);
}
示例11: createFile
// Slice createFile() operation.
public override FilePrx createFile(string name, Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
if(name.Length == 0 || _contents.ContainsKey(name))
{
throw new NameInUse(name);
}
var f = new FileI(name, this);
var node = c.adapter.add(f, f.id());
_contents.Add(name, f);
return FilePrxHelper.uncheckedCast(node);
}
}
示例12: createDirectory
// Slice createDirectory() operation.
public override DirectoryPrx createDirectory(string name, Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
if(name.Length == 0 || _contents.ContainsKey(name))
{
throw new NameInUse(name);
}
var d = new DirectoryI(name, this);
var node = c.adapter.add(d, d.id());
_contents.Add(name, d);
return DirectoryPrxHelper.uncheckedCast(node);
}
}
示例13: find
// Slice find() operation.
public override NodeDesc find(string name, Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
NodeI p = (NodeI) _contents[name];
if(p == null)
{
throw new NoSuchName(name);
}
NodeDesc d = new NodeDesc();
d.name = name;
d.type = p is FileI ? NodeType.FileType : NodeType.DirType;
d.proxy = NodePrxHelper.uncheckedCast(c.adapter.createProxy(p.id()));
return d;
}
}
示例14: list
// Slice list() operation.
public override NodeDesc[] list(Current c)
{
lock(this)
{
if(_destroyed)
{
throw new ObjectNotExistException();
}
NodeDesc[] ret = new NodeDesc[_contents.Count];
int i = 0;
foreach(DictionaryEntry e in _contents)
{
NodeI p = (NodeI)e.Value;
ret[i] = new NodeDesc();
ret[i].name = (string)e.Key;
ret[i].type = p is FileI ? NodeType.FileType : NodeType.DirType;
ret[i].proxy = NodePrxHelper.uncheckedCast(c.adapter.createProxy(p.id()));
++i;
}
return ret;
}
}
示例15: getTimeValue
/// <summary>
/// Method getdateValue
/// </summary>
/// <param name="year">A short</param>
/// <param name="month">A short</param>
/// <param name="day">A short</param>
/// <param name="__current">An Ice.Current</param>
public override void getTimeValue(out short hour, out short minute, out short second, Current __current)
{
hour = this.hour;
minute = this.minute;
second = this.second;
}