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
- OleDbError.cs
- DocumentViewer.cs
- StructureChangedEventArgs.cs
- UnmanagedMarshal.cs
- LinqDataSourceDeleteEventArgs.cs
- WebSysDescriptionAttribute.cs
- ResolveNameEventArgs.cs
- WindowsPen.cs
- TraceSource.cs
- SslStream.cs
- CallSiteHelpers.cs
- DataErrorValidationRule.cs
- Duration.cs
- JavaScriptString.cs
- HttpInputStream.cs
- UnhandledExceptionEventArgs.cs
- SqlUnionizer.cs
- Marshal.cs
- TreeViewCancelEvent.cs
- Html32TextWriter.cs
- ProgressBar.cs
- ToolboxBitmapAttribute.cs
- Queue.cs
- CodeDomConfigurationHandler.cs
- BufferedGraphics.cs
- FontWeight.cs
- TypeExtensionConverter.cs
- SystemInformation.cs
- HtmlInputRadioButton.cs
- SqlDataSourceCommandEventArgs.cs
- Symbol.cs
- CmsInterop.cs
- ToolStripProgressBar.cs
- DesignerObjectListAdapter.cs
- PathBox.cs
- ClusterUtils.cs
- WebPartMenuStyle.cs
- XPathSingletonIterator.cs
- LambdaReference.cs
- PhysicalFontFamily.cs
- ArrayWithOffset.cs
- TabPanel.cs
- TabControlDesigner.cs
- ToolStripMenuItemDesigner.cs
- TypefaceMap.cs
- ToolStripManager.cs
- RegionIterator.cs
- FuncTypeConverter.cs
- FontSource.cs
- DesignerImageAdapter.cs
- GACIdentityPermission.cs
- StrongNameKeyPair.cs
- GridViewColumnHeaderAutomationPeer.cs
- BaseTemplateParser.cs
- _RequestCacheProtocol.cs
- FormsAuthenticationTicket.cs
- InvalidateEvent.cs
- DataGridViewRowsAddedEventArgs.cs
- EventDescriptor.cs
- BuiltInPermissionSets.cs
- CodeChecksumPragma.cs
- StrokeCollectionConverter.cs
- ZoneButton.cs
- ObjectStorage.cs
- ModuleBuilder.cs
- CustomValidator.cs
- EncryptedType.cs
- ComponentResourceKey.cs
- InternalUserCancelledException.cs
- Trustee.cs
- GraphicsPathIterator.cs
- ConfigurationManagerHelper.cs
- LogEntryDeserializer.cs
- WebColorConverter.cs
- LicenseException.cs
- RequestQueryParser.cs
- HuffCodec.cs
- DecimalStorage.cs
- oledbconnectionstring.cs
- AuthStoreRoleProvider.cs
- ResXBuildProvider.cs
- NetworkInformationPermission.cs
- SessionStateSection.cs
- AspNetRouteServiceHttpHandler.cs
- SystemSounds.cs
- Point4D.cs
- compensatingcollection.cs
- SchemaMerger.cs
- HandlerMappingMemo.cs
- ResourceAssociationType.cs
- ActivitySurrogateSelector.cs
- RSAPKCS1SignatureDeformatter.cs
- DesignerDataParameter.cs
- _BasicClient.cs
- UnhandledExceptionEventArgs.cs
- XMLSchema.cs
- DependencySource.cs
- OracleConnectionString.cs
- ClonableStack.cs
- DragStartedEventArgs.cs