本文整理汇总了C#中System.Threading.StackCrawlMark类的典型用法代码示例。如果您正苦于以下问题:C# StackCrawlMark类的具体用法?C# StackCrawlMark怎么用?C# StackCrawlMark使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StackCrawlMark类属于System.Threading命名空间,在下文中一共展示了StackCrawlMark类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _IOCompletionCallback
internal _IOCompletionCallback(IOCompletionCallback ioCompletionCallback, ref StackCrawlMark stackMark)
{
_ioCompletionCallback = ioCompletionCallback;
// clone the exection context
_executionContext = ExecutionContext.Capture(ref stackMark);
ExecutionContext.ClearSyncContext(_executionContext);
}
示例2: GrovelForResourceSet
public ResourceSet GrovelForResourceSet(CultureInfo culture, Dictionary<string, ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists, ref StackCrawlMark stackMark)
{
string file = null;
ResourceSet set = null;
ResourceSet set2;
try
{
new FileIOPermission(PermissionState.Unrestricted).Assert();
string resourceFileName = this._mediator.GetResourceFileName(culture);
file = this.FindResourceFile(culture, resourceFileName);
if (file == null)
{
if (tryParents && culture.HasInvariantCultureName)
{
throw new MissingManifestResourceException(Environment.GetResourceString("MissingManifestResource_NoNeutralDisk") + Environment.NewLine + "baseName: " + this._mediator.BaseNameField + " locationInfo: " + ((this._mediator.LocationInfo == null) ? "<null>" : this._mediator.LocationInfo.FullName) + " fileName: " + this._mediator.GetResourceFileName(culture));
}
}
else
{
set = this.CreateResourceSet(file);
}
set2 = set;
}
finally
{
CodeAccessPermission.RevertAssert();
}
return set2;
}
示例3: GetType
internal static Type GetType(
string typeName,
Func<AssemblyName, Assembly> assemblyResolver,
Func<Assembly, string, bool, Type> typeResolver,
bool throwOnError,
bool ignoreCase,
ref StackCrawlMark stackMark)
{
if (typeName == null)
throw new ArgumentNullException("typeName");
if (typeName.Length > 0 && typeName[0] == '\0')
throw new ArgumentException(Environment.GetResourceString("Format_StringZeroLength"));
Contract.EndContractBlock();
Type ret = null;
SafeTypeNameParserHandle handle = CreateTypeNameParser(typeName, throwOnError);
if (handle != null)
{
// If we get here the typeName must have been successfully parsed.
// Let's construct the Type object.
using (TypeNameParser parser = new TypeNameParser(handle))
{
ret = parser.ConstructType(assemblyResolver, typeResolver, throwOnError, ignoreCase, ref stackMark);
}
}
return ret;
}
示例4: Capture
internal static ExecutionContext Capture(ref StackCrawlMark stackMark)
{
if (IsFlowSuppressed())
{
return null;
}
ExecutionContext executionContextNoCreate = System.Threading.Thread.CurrentThread.GetExecutionContextNoCreate();
ExecutionContext context2 = new ExecutionContext {
isNewCapture = true,
SecurityContext = System.Security.SecurityContext.Capture(executionContextNoCreate, ref stackMark)
};
if (context2.SecurityContext != null)
{
context2.SecurityContext.ExecutionContext = context2;
}
context2._hostExecutionContext = HostExecutionContextManager.CaptureHostExecutionContext();
if (executionContextNoCreate != null)
{
context2._syncContext = (executionContextNoCreate._syncContext == null) ? null : executionContextNoCreate._syncContext.CreateCopy();
if (executionContextNoCreate._logicalCallContext != null)
{
System.Runtime.Remoting.Messaging.LogicalCallContext logicalCallContext = executionContextNoCreate.LogicalCallContext;
context2.LogicalCallContext = (System.Runtime.Remoting.Messaging.LogicalCallContext) logicalCallContext.Clone();
}
}
return context2;
}
示例5: _IOCompletionCallback
internal _IOCompletionCallback(IOCompletionCallback ioCompletionCallback, ref StackCrawlMark stackMark)
{
_ioCompletionCallback = ioCompletionCallback;
// clone the exection context
_executionContext = ExecutionContext.Capture(
ref stackMark,
ExecutionContext.CaptureOptions.IgnoreSyncCtx | ExecutionContext.CaptureOptions.OptimizeDefaultCase);
}
示例6: ConstructType
private unsafe Type ConstructType(Func<AssemblyName, Assembly> assemblyResolver, Func<Assembly, string, bool, Type> typeResolver, bool throwOnError, bool ignoreCase, ref StackCrawlMark stackMark)
{
Assembly assembly = null;
int[] numArray2;
string assemblyName = this.GetAssemblyName();
if (assemblyName.Length > 0)
{
assembly = ResolveAssembly(assemblyName, assemblyResolver, throwOnError, ref stackMark);
if (assembly == null)
{
return null;
}
}
string[] names = this.GetNames();
if (names == null)
{
if (throwOnError)
{
throw new TypeLoadException(Environment.GetResourceString("Arg_TypeLoadNullStr"));
}
return null;
}
Type typeStart = ResolveType(assembly, names, typeResolver, throwOnError, ignoreCase, ref stackMark);
if (typeStart == null)
{
return null;
}
SafeTypeNameParserHandle[] typeArguments = this.GetTypeArguments();
Type[] genericArgs = null;
if (typeArguments != null)
{
genericArgs = new Type[typeArguments.Length];
for (int i = 0; i < typeArguments.Length; i++)
{
using (TypeNameParser parser = new TypeNameParser(typeArguments[i]))
{
genericArgs[i] = parser.ConstructType(assemblyResolver, typeResolver, throwOnError, ignoreCase, ref stackMark);
}
if (genericArgs[i] == null)
{
return null;
}
}
}
int[] modifiers = this.GetModifiers();
if (((numArray2 = modifiers) == null) || (numArray2.Length == 0))
{
numRef = null;
goto Label_00EE;
}
fixed (int* numRef = numArray2)
{
IntPtr ptr;
Label_00EE:
ptr = new IntPtr((void*) numRef);
return RuntimeTypeHandle.GetTypeHelper(typeStart, genericArgs, ptr, (modifiers == null) ? 0 : modifiers.Length);
}
}
示例7: _TimerCallback
internal _TimerCallback(TimerCallback timerCallback, object state, ref StackCrawlMark stackMark)
{
this._timerCallback = timerCallback;
this._state = state;
if (!ExecutionContext.IsFlowSuppressed())
{
this._executionContext = ExecutionContext.Capture(ref stackMark, ExecutionContext.CaptureOptions.OptimizeDefaultCase | ExecutionContext.CaptureOptions.IgnoreSyncCtx);
}
}
示例8: _ThreadPoolWaitCallback
internal _ThreadPoolWaitCallback(WaitCallback waitCallback, object state, bool compressStack, ref StackCrawlMark stackMark)
{
this._waitCallback = waitCallback;
this._state = state;
if (compressStack && !ExecutionContext.IsFlowSuppressed())
{
this._executionContext = ExecutionContext.Capture(ref stackMark, ExecutionContext.CaptureOptions.OptimizeDefaultCase | ExecutionContext.CaptureOptions.IgnoreSyncCtx);
}
}
示例9: QueueUserWorkItemCallback
internal QueueUserWorkItemCallback(WaitCallback waitCallback, object stateObj, bool compressStack, ref StackCrawlMark stackMark)
{
this.callback = waitCallback;
this.state = stateObj;
if (compressStack && !ExecutionContext.IsFlowSuppressed())
{
this.context = ExecutionContext.Capture(ref stackMark, ExecutionContext.CaptureOptions.OptimizeDefaultCase | ExecutionContext.CaptureOptions.IgnoreSyncCtx);
}
}
示例10: _ThreadPoolWaitOrTimerCallback
internal _ThreadPoolWaitOrTimerCallback(WaitOrTimerCallback waitOrTimerCallback, object state, bool compressStack, ref StackCrawlMark stackMark)
{
this._waitOrTimerCallback = waitOrTimerCallback;
this._state = state;
if (compressStack && !ExecutionContext.IsFlowSuppressed())
{
this._executionContext = ExecutionContext.Capture(ref stackMark);
ExecutionContext.ClearSyncContext(this._executionContext);
}
}
示例11: _TimerCallback
internal _TimerCallback(TimerCallback timerCallback, Object state, ref StackCrawlMark stackMark)
{
_timerCallback = timerCallback;
_state = state;
if (!ExecutionContext.IsFlowSuppressed())
{
_executionContext = ExecutionContext.Capture(ref stackMark);
ExecutionContext.ClearSyncContext(_executionContext);
}
}
示例12: GetType
internal static Type GetType(
string typeName,
Func<AssemblyName, Assembly> assemblyResolver,
Func<Assembly, string, bool, Type> typeResolver,
bool throwOnError,
bool ignoreCase,
ref StackCrawlMark stackMark)
{
TypeSpec spec = TypeSpec.Parse (typeName);
return spec.Resolve (assemblyResolver, typeResolver, throwOnError, ignoreCase);
}
示例13: AddTimer
internal void AddTimer(TimerCallback callback, object state, uint dueTime, uint period, ref StackCrawlMark stackMark)
{
if (callback == null)
{
throw new ArgumentNullException("TimerCallback");
}
_TimerCallback callback2 = new _TimerCallback(callback, state, ref stackMark);
state = callback2;
this.AddTimerNative(state, dueTime, period, ref stackMark);
this.timerDeleted = 0;
}
示例14: ConstructType
private unsafe Type ConstructType(Func<AssemblyName, Assembly> assemblyResolver, Func<Assembly, string, bool, Type> typeResolver, bool throwOnError, bool ignoreCase, ref StackCrawlMark stackMark)
{
Assembly assembly = null;
string assemblyName = this.GetAssemblyName();
if (assemblyName.Length > 0)
{
assembly = TypeNameParser.ResolveAssembly(assemblyName, assemblyResolver, throwOnError, ref stackMark);
if (assembly == null)
{
return null;
}
}
string[] names = this.GetNames();
if (names == null)
{
if (throwOnError)
{
throw new TypeLoadException(Environment.GetResourceString("Arg_TypeLoadNullStr"));
}
return null;
}
else
{
Type type = TypeNameParser.ResolveType(assembly, names, typeResolver, throwOnError, ignoreCase, ref stackMark);
if (type == null)
{
return null;
}
SafeTypeNameParserHandle[] typeArguments = this.GetTypeArguments();
Type[] array = null;
if (typeArguments != null)
{
array = new Type[typeArguments.Length];
for (int i = 0; i < typeArguments.Length; i++)
{
using (TypeNameParser typeNameParser = new TypeNameParser(typeArguments[i]))
{
array[i] = typeNameParser.ConstructType(assemblyResolver, typeResolver, throwOnError, ignoreCase, ref stackMark);
}
if (array[i] == null)
{
return null;
}
}
}
int[] modifiers = this.GetModifiers();
fixed (int* ptr = modifiers)
{
IntPtr pModifiers = new IntPtr((void*)ptr);
return RuntimeTypeHandle.GetTypeHelper(type, array, pModifiers, (modifiers == null) ? 0 : modifiers.Length);
}
}
}
示例15: CreateInstanceSlow
internal Object CreateInstanceSlow(bool publicOnly, bool skipCheckThis, bool fillCache, ref StackCrawlMark stackMark)
{
bool bNeedSecurityCheck = true;
bool bCanBeCached = false;
bool bSecurityCheckOff = false;
if (!skipCheckThis)
CreateInstanceCheckThis();
if (!fillCache)
bSecurityCheckOff = true;
return CreateInstanceMono (!publicOnly);
}