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
- InvalidDataException.cs
- FormatConvertedBitmap.cs
- DebugView.cs
- VectorCollection.cs
- CorrelationScope.cs
- Padding.cs
- EnumBuilder.cs
- CompiledELinqQueryState.cs
- SecuritySessionFilter.cs
- XmlTextReaderImpl.cs
- MarkupObject.cs
- CharacterMetricsDictionary.cs
- DescendantOverDescendantQuery.cs
- IImplicitResourceProvider.cs
- Size.cs
- TransactionContextManager.cs
- DataGridViewCheckBoxCell.cs
- QueuePathDialog.cs
- DataRelationPropertyDescriptor.cs
- ContainerTracking.cs
- SimpleBitVector32.cs
- tibetanshape.cs
- GeometryGroup.cs
- MarginCollapsingState.cs
- EntityCommandDefinition.cs
- SafeEventLogWriteHandle.cs
- ExtendedPropertyCollection.cs
- DependencyPropertyAttribute.cs
- ReadOnlyObservableCollection.cs
- XmlRawWriter.cs
- Viewport3DAutomationPeer.cs
- FileVersion.cs
- HtmlLiteralTextAdapter.cs
- RelationshipConverter.cs
- WebServiceReceive.cs
- TimeZone.cs
- TabPanel.cs
- MultiAsyncResult.cs
- XPathParser.cs
- ChangeToolStripParentVerb.cs
- DataGridTextBoxColumn.cs
- WindowsTab.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- LabelTarget.cs
- RNGCryptoServiceProvider.cs
- BamlBinaryReader.cs
- WebServiceErrorEvent.cs
- SQLBinaryStorage.cs
- ViewStateException.cs
- MemberPath.cs
- PackUriHelper.cs
- VirtualizingStackPanel.cs
- AddInAdapter.cs
- NopReturnReader.cs
- AssemblyNameProxy.cs
- ImageCodecInfo.cs
- Button.cs
- SoapInteropTypes.cs
- WebInvokeAttribute.cs
- RectIndependentAnimationStorage.cs
- Activator.cs
- SurrogateDataContract.cs
- HttpPostedFile.cs
- X509ThumbprintKeyIdentifierClause.cs
- XPathNavigatorReader.cs
- FamilyMapCollection.cs
- HtmlInputSubmit.cs
- SoapObjectReader.cs
- EntityExpressionVisitor.cs
- InternalConfigHost.cs
- StatusBarAutomationPeer.cs
- TextElementCollectionHelper.cs
- NameTable.cs
- GeometryModel3D.cs
- RegexTree.cs
- DLinqTableProvider.cs
- DynamicResourceExtensionConverter.cs
- Predicate.cs
- StaticDataManager.cs
- ComponentDesigner.cs
- MultiByteCodec.cs
- __ConsoleStream.cs
- LineProperties.cs
- CheckBox.cs
- AbstractDataSvcMapFileLoader.cs
- PermissionRequestEvidence.cs
- DeclaredTypeElement.cs
- InputProcessorProfilesLoader.cs
- ConstructorBuilder.cs
- XmlSerializerNamespaces.cs
- SystemBrushes.cs
- OptimizerPatterns.cs
- ConstructorExpr.cs
- SqlFileStream.cs
- ImageCodecInfo.cs
- BrowserInteropHelper.cs
- PropertyKey.cs
- ZoneButton.cs
- ErrorFormatterPage.cs
- MenuEventArgs.cs