當前位置: 首頁>>代碼示例>>C#>>正文


C# Threading.StackCrawlMark類代碼示例

本文整理匯總了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);
 }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:7,代碼來源:overlapped.cs

示例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;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:29,代碼來源:FileBasedResourceGroveler.cs

示例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;
        }
開發者ID:l1183479157,項目名稱:coreclr,代碼行數:30,代碼來源:TypeNameParser.cs

示例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;
 }
開發者ID:randomize,項目名稱:VimConfig,代碼行數:27,代碼來源:ExecutionContext.cs

示例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);
 }
開發者ID:kouvel,項目名稱:coreclr,代碼行數:8,代碼來源:Overlapped.cs

示例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);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:58,代碼來源:TypeNameParser.cs

示例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);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:_TimerCallback.cs

示例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);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:_ThreadPoolWaitCallback.cs

示例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);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:QueueUserWorkItemCallback.cs

示例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);
     }
 }
開發者ID:randomize,項目名稱:VimConfig,代碼行數:10,代碼來源:_ThreadPoolWaitOrTimerCallback.cs

示例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);
     }
 }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:10,代碼來源:timer.cs

示例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);
		}
開發者ID:Profit0004,項目名稱:mono,代碼行數:11,代碼來源:TypeNameParser.cs

示例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;
 }
開發者ID:randomize,項目名稱:VimConfig,代碼行數:11,代碼來源:TimerBase.cs

示例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);
				}
			}
		}
開發者ID:ChristianWulf,項目名稱:CSharpKDMDiscoverer,代碼行數:53,代碼來源:TypeNameParser.cs

示例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);
		}
開發者ID:JokerMisfits,項目名稱:linux-packaging-mono,代碼行數:14,代碼來源:RuntimeType.cs


注:本文中的System.Threading.StackCrawlMark類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。