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
- FileInfo.cs
- StringConcat.cs
- Boolean.cs
- XmlSchemaImport.cs
- NeutralResourcesLanguageAttribute.cs
- Empty.cs
- XmlQueryRuntime.cs
- VersionPair.cs
- DataServiceException.cs
- ResourcePermissionBaseEntry.cs
- querybuilder.cs
- ColumnBinding.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- ConfigurationPermission.cs
- EdmType.cs
- DirectoryObjectSecurity.cs
- SecurityPermission.cs
- AssemblyNameProxy.cs
- BasicExpressionVisitor.cs
- AssemblySettingAttributes.cs
- DataSetMappper.cs
- CodeDirectiveCollection.cs
- AllMembershipCondition.cs
- ClientScriptItemCollection.cs
- ThreadSafeList.cs
- contentDescriptor.cs
- XmlIgnoreAttribute.cs
- BamlTreeNode.cs
- MarshalByValueComponent.cs
- Pointer.cs
- MatrixAnimationUsingKeyFrames.cs
- ConfigXmlCDataSection.cs
- ObjectViewEntityCollectionData.cs
- ConfigXmlComment.cs
- SerialPinChanges.cs
- CellTreeSimplifier.cs
- TextSimpleMarkerProperties.cs
- ScrollChrome.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- XMLDiffLoader.cs
- SerializerProvider.cs
- ProcessThread.cs
- EventWaitHandle.cs
- DecoderNLS.cs
- FirstQueryOperator.cs
- ToolStripAdornerWindowService.cs
- ConvertBinder.cs
- ParamArrayAttribute.cs
- EventWaitHandleSecurity.cs
- Membership.cs
- DirectoryObjectSecurity.cs
- MissingMemberException.cs
- ScriptComponentDescriptor.cs
- GuidelineSet.cs
- Renderer.cs
- GeometryDrawing.cs
- DirectoryNotFoundException.cs
- HotSpot.cs
- PenContexts.cs
- HMACSHA384.cs
- HtmlControlDesigner.cs
- unsafenativemethodstextservices.cs
- PointF.cs
- ComponentCodeDomSerializer.cs
- XhtmlBasicCommandAdapter.cs
- NativeMethodsOther.cs
- XmlSchemaGroup.cs
- Simplifier.cs
- WindowsTokenRoleProvider.cs
- UriTemplateLiteralPathSegment.cs
- SecurityMode.cs
- CLSCompliantAttribute.cs
- TreeViewCancelEvent.cs
- FigureHelper.cs
- ToolboxComponentsCreatedEventArgs.cs
- UpdateRecord.cs
- Msec.cs
- AnnotationDocumentPaginator.cs
- LinqDataSourceStatusEventArgs.cs
- MimeMultiPart.cs
- WmlListAdapter.cs
- PageBreakRecord.cs
- COM2EnumConverter.cs
- remotingproxy.cs
- DataGridViewCellConverter.cs
- InvariantComparer.cs
- KoreanLunisolarCalendar.cs
- StyleSelector.cs
- AuthenticationServiceManager.cs
- SqlBuffer.cs
- BigInt.cs
- DoubleLinkList.cs
- OletxTransactionHeader.cs
- InternalSafeNativeMethods.cs
- EventListenerClientSide.cs
- MulticastIPAddressInformationCollection.cs
- TrustDriver.cs
- SplineKeyFrames.cs
- DeviceOverridableAttribute.cs
- TimeSpanValidatorAttribute.cs