Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Misc / MultitargetUtil.cs / 1305376 / MultitargetUtil.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Resources { using System; ////// Helper class supporting Multitarget type assembly qualified name resolution for ResX API. /// Note: this file is compiled into different assemblies (runtime and VSIP assemblies ...) /// internal static class MultitargetUtil { ////// This method gets assembly info for the corresponding type. If the delegate /// is provided it is used to get this information. /// public static string GetAssemblyQualifiedName(Type type, FunctypeNameConverter) { string assemblyQualifiedName = null; if (type != null) { if (typeNameConverter != null) { try { assemblyQualifiedName = typeNameConverter(type); } catch (Exception e) { if (IsSecurityOrCriticalException(e)) { throw; } } } if (string.IsNullOrEmpty(assemblyQualifiedName)) { assemblyQualifiedName = type.AssemblyQualifiedName; } } return assemblyQualifiedName; } // ExecutionEngineException is obsolete and shouldn't be used (to catch, throw or reference) anymore. // Pragma added to prevent converting the "type is obsolete" warning into build error. #pragma warning disable 618 private static bool IsSecurityOrCriticalException(Exception ex) { return ex is NullReferenceException || ex is StackOverflowException || ex is OutOfMemoryException || ex is System.Threading.ThreadAbortException || ex is ExecutionEngineException || ex is IndexOutOfRangeException || ex is AccessViolationException || ex is System.Security.SecurityException; } #pragma warning restore 618 } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NonBatchDirectoryCompiler.cs
- BaseInfoTable.cs
- PlatformCulture.cs
- EndpointDiscoveryBehavior.cs
- SmtpMail.cs
- CheckBoxList.cs
- SqlDataSource.cs
- StateBag.cs
- Span.cs
- GenericPrincipal.cs
- OverlappedAsyncResult.cs
- PropertyDescriptorComparer.cs
- Adorner.cs
- InvokeHandlers.cs
- MemberPath.cs
- BaseTemplateBuildProvider.cs
- DynamicResourceExtension.cs
- MetabaseSettingsIis7.cs
- OleDbError.cs
- MetabaseSettings.cs
- SkipQueryOptionExpression.cs
- DisableDpiAwarenessAttribute.cs
- DataIdProcessor.cs
- TransformGroup.cs
- BindingExpressionBase.cs
- GridPattern.cs
- ServiceOperationInfoTypeConverter.cs
- XPathNodeList.cs
- PropertyEmitterBase.cs
- DispatcherOperation.cs
- TagNameToTypeMapper.cs
- ServiceDescriptionSerializer.cs
- ConfigXmlCDataSection.cs
- GridViewCancelEditEventArgs.cs
- WSHttpBindingCollectionElement.cs
- FlowStep.cs
- EdmToObjectNamespaceMap.cs
- LinearGradientBrush.cs
- TagPrefixInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- _FixedSizeReader.cs
- TextClipboardData.cs
- LinkDesigner.cs
- PtsContext.cs
- SymbolEqualComparer.cs
- ActivityTypeResolver.xaml.cs
- NoneExcludedImageIndexConverter.cs
- TextRenderer.cs
- CodeCatchClauseCollection.cs
- RemotingConfigParser.cs
- TreeNodeStyleCollection.cs
- ScriptingSectionGroup.cs
- InternalPolicyElement.cs
- Win32.cs
- ToolStripDesigner.cs
- LoadRetryAsyncResult.cs
- ServiceContractGenerationContext.cs
- mediaeventshelper.cs
- Point3D.cs
- XmlLangPropertyAttribute.cs
- ManagementEventArgs.cs
- OletxTransactionManager.cs
- RawStylusInputCustomData.cs
- NetWebProxyFinder.cs
- CodeNamespaceCollection.cs
- UpdatePanelControlTrigger.cs
- ImportDesigner.xaml.cs
- _LocalDataStoreMgr.cs
- TranslateTransform3D.cs
- Error.cs
- ExceptionHelpers.cs
- TransactionChannelFactory.cs
- InkCanvasSelection.cs
- ExpressionConverter.cs
- DirectoryLocalQuery.cs
- RootProfilePropertySettingsCollection.cs
- webbrowsersite.cs
- Inflater.cs
- GeometryDrawing.cs
- TypedTableBaseExtensions.cs
- DocumentNUp.cs
- PipeStream.cs
- HierarchicalDataSourceIDConverter.cs
- ListViewEditEventArgs.cs
- WindowsToolbar.cs
- XmlILStorageConverter.cs
- VectorValueSerializer.cs
- Menu.cs
- ProfileEventArgs.cs
- ReversePositionQuery.cs
- TabItemAutomationPeer.cs
- ObjectViewFactory.cs
- FileDialogPermission.cs
- ProcessThreadCollection.cs
- MoveSizeWinEventHandler.cs
- BmpBitmapDecoder.cs
- OpenCollectionAsyncResult.cs
- Parameter.cs
- PropertySegmentSerializer.cs
- Focus.cs