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
- CommandBindingCollection.cs
- SourceInterpreter.cs
- OdbcReferenceCollection.cs
- DoWorkEventArgs.cs
- AutoGeneratedField.cs
- DataProtection.cs
- HttpContextWrapper.cs
- DataGridTableCollection.cs
- ConnectionStringSettingsCollection.cs
- StaticResourceExtension.cs
- BlurBitmapEffect.cs
- FixedPosition.cs
- ThousandthOfEmRealPoints.cs
- WrapperEqualityComparer.cs
- ClientRoleProvider.cs
- IntSecurity.cs
- DocumentReferenceCollection.cs
- UIInitializationException.cs
- UIInitializationException.cs
- ScrollEvent.cs
- dataSvcMapFileLoader.cs
- StrokeRenderer.cs
- OleDbConnectionFactory.cs
- UnsafeNativeMethods.cs
- ListItemViewControl.cs
- VerticalAlignConverter.cs
- FloatUtil.cs
- CallbackValidatorAttribute.cs
- DynamicDataExtensions.cs
- FormViewRow.cs
- HtmlElementEventArgs.cs
- Sequence.cs
- SafeCoTaskMem.cs
- UIElementAutomationPeer.cs
- DbMetaDataCollectionNames.cs
- UpdateCompiler.cs
- CustomPopupPlacement.cs
- OdbcHandle.cs
- ObjectListFieldsPage.cs
- RootBuilder.cs
- UpDownEvent.cs
- ExeConfigurationFileMap.cs
- ToolboxItemCollection.cs
- SharedStream.cs
- COM2ExtendedUITypeEditor.cs
- OdbcError.cs
- TransferMode.cs
- CounterCreationDataCollection.cs
- SymDocumentType.cs
- LicenseException.cs
- SqlAggregateChecker.cs
- Viewport3DVisual.cs
- _CommandStream.cs
- PanelStyle.cs
- WebScriptEnablingBehavior.cs
- DataProtection.cs
- LogoValidationException.cs
- Keywords.cs
- AsymmetricKeyExchangeDeformatter.cs
- ToolboxService.cs
- TracingConnectionListener.cs
- Gdiplus.cs
- FontFamilyConverter.cs
- ListItemCollection.cs
- GenericNameHandler.cs
- ValidationErrorEventArgs.cs
- Point3DAnimation.cs
- LineBreakRecord.cs
- DatagridviewDisplayedBandsData.cs
- EdmItemCollection.cs
- AttributeCollection.cs
- DetailsViewAutoFormat.cs
- TaskFileService.cs
- AttributeAction.cs
- ControlTemplate.cs
- SessionState.cs
- BuildManagerHost.cs
- ProfileServiceManager.cs
- GroupItemAutomationPeer.cs
- HyperLinkField.cs
- XmlNamespaceDeclarationsAttribute.cs
- RuntimeEnvironment.cs
- WindowsGrip.cs
- TaiwanCalendar.cs
- OleDbDataAdapter.cs
- ReadOnlyCollection.cs
- Error.cs
- TriggerActionCollection.cs
- mongolianshape.cs
- DeleteWorkflowOwnerCommand.cs
- AsyncSerializedWorker.cs
- FunctionImportElement.cs
- While.cs
- PartialTrustVisibleAssembly.cs
- Publisher.cs
- ImplicitInputBrush.cs
- CompilerHelpers.cs
- WsrmTraceRecord.cs
- control.ime.cs
- StringResourceManager.cs