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
- BitmapEffectDrawingContent.cs
- RoleManagerEventArgs.cs
- ECDsa.cs
- FrameworkTextComposition.cs
- DbDataRecord.cs
- ByteStreamGeometryContext.cs
- RootBrowserWindow.cs
- IndexedGlyphRun.cs
- AesCryptoServiceProvider.cs
- SubclassTypeValidator.cs
- DeferredBinaryDeserializerExtension.cs
- SignatureTargetIdManager.cs
- ToolboxSnapDragDropEventArgs.cs
- TransactionScope.cs
- SessionState.cs
- DataGridViewRowsAddedEventArgs.cs
- InternalCompensate.cs
- SamlAuthenticationClaimResource.cs
- TemplatePagerField.cs
- DataRowIndexBuffer.cs
- ListViewItem.cs
- RetriableClipboard.cs
- OracleRowUpdatingEventArgs.cs
- DataGridViewCellCancelEventArgs.cs
- LineGeometry.cs
- ServiceEndpointElementCollection.cs
- ThreadExceptionEvent.cs
- XPathDocumentBuilder.cs
- EncoderParameters.cs
- DependencyPropertyValueSerializer.cs
- CharacterBuffer.cs
- RSAOAEPKeyExchangeFormatter.cs
- Operand.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HttpCapabilitiesEvaluator.cs
- ScriptReferenceEventArgs.cs
- UpdatePanelControlTrigger.cs
- StatusBarPanel.cs
- Compilation.cs
- counter.cs
- ServicePoint.cs
- CodeGenerator.cs
- InternalPolicyElement.cs
- X509Extension.cs
- TextOutput.cs
- ItemsPresenter.cs
- MemoryMappedView.cs
- DataGridViewControlCollection.cs
- DataDocumentXPathNavigator.cs
- RepeatBehavior.cs
- FrameworkContextData.cs
- XPathBinder.cs
- ActionItem.cs
- SafeBitVector32.cs
- DiscoveryClientProtocol.cs
- XmlReflectionMember.cs
- SslSecurityTokenParameters.cs
- DataSvcMapFileSerializer.cs
- Substitution.cs
- BasicAsyncResult.cs
- CodeConditionStatement.cs
- DebugManager.cs
- WmlCalendarAdapter.cs
- FormCollection.cs
- ExceptionHelpers.cs
- XsdDateTime.cs
- ArithmeticLiteral.cs
- SQLUtility.cs
- TextEffectResolver.cs
- Label.cs
- QilTargetType.cs
- DataObjectEventArgs.cs
- UnmanagedMarshal.cs
- ConsoleEntryPoint.cs
- UdpChannelFactory.cs
- ModulesEntry.cs
- FormViewUpdateEventArgs.cs
- SystemIPv4InterfaceProperties.cs
- TableLayoutSettingsTypeConverter.cs
- SqlFlattener.cs
- Nullable.cs
- TableLayoutColumnStyleCollection.cs
- Configuration.cs
- OleDbReferenceCollection.cs
- TreeNodeCollectionEditorDialog.cs
- TextServicesLoader.cs
- OleTxTransactionInfo.cs
- FormViewInsertedEventArgs.cs
- HttpListenerContext.cs
- ToolStripSettings.cs
- BackStopAuthenticationModule.cs
- SyndicationPerson.cs
- SQLInt32.cs
- FixedTextView.cs
- ParameterModifier.cs
- OracleConnection.cs
- _ListenerAsyncResult.cs
- IdnElement.cs
- DirtyTextRange.cs
- ListBoxItemAutomationPeer.cs