本文整理汇总了C#中TaintCallback类的典型用法代码示例。如果您正苦于以下问题:C# TaintCallback类的具体用法?C# TaintCallback怎么用?C# TaintCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaintCallback类属于命名空间,在下文中一共展示了TaintCallback类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TaintedObject
// Sometimes a potentially tainted operation can be used in and out of taint time.
// This routine executes the command immediately if in taint-time otherwise it is queued.
public void TaintedObject(bool inTaintTime, string pOriginator, string pIdent, TaintCallback pCallback)
{
if (!m_initialized) return;
if (inTaintTime)
pCallback();
else
{
lock (_taintLock)
{
_taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback));
}
}
}
示例2: PostTaintObject
// Schedule an update to happen after all the regular taints are processed.
// Note that new requests for the same operation ("ident") for the same object ("ID")
// will replace any previous operation by the same object.
public void PostTaintObject(String ident, uint ID, TaintCallback callback)
{
string IDAsString = ID.ToString();
string uniqueIdent = ident + "-" + IDAsString;
lock (_taintLock)
{
_postTaintOperations[uniqueIdent] = new TaintCallbackEntry(IDAsString, uniqueIdent, callback);
}
return;
}
示例3: TaintCallbackEntry
public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack)
{
originator = pOrigin;
ident = pIdent;
callback = pCallBack;
}
示例4: TaintedObject
// Sometimes a potentially tainted operation can be used in and out of taint time.
// This routine executes the command immediately if in taint-time otherwise it is queued.
public void TaintedObject(bool inTaintTime, string ident, TaintCallback callback)
{
if (inTaintTime)
callback();
else
TaintedObject(ident, callback);
}
示例5: TaintCallbackEntry
public TaintCallbackEntry(string i, TaintCallback c)
{
ident = i;
callback = c;
}
示例6: TaintedObject
// The calls to the PhysicsActors can't directly call into the physics engine
// because it might be busy. We we delay changes to a known time.
// We rely on C#'s closure to save and restore the context for the delegate.
public void TaintedObject(TaintCallback callback)
{
lock (_taintLock)
_taintedObjects.Add(callback);
return;
}