Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / Baml2006 / Baml6Assembly.cs / 1305600 / Baml6Assembly.cs
using System; using System.Collections.Generic; using System.Reflection; using MS.Internal.WindowsBase; namespace System.Windows.Baml2006 { class Baml6Assembly { // Information needed to resolve a BamlAssembly to a CLR Assembly public readonly string Name; private Assembly _assembly; ////// /// A fully qualified assembly name public Baml6Assembly(string name) { if (name == null) { throw new ArgumentNullException("name"); } Name = name; _assembly = null; } public Baml6Assembly(Assembly assembly) { if (assembly == null) { throw new ArgumentNullException("assembly"); } Name = null; _assembly = assembly; } public Assembly Assembly { get { if (_assembly != null) { return _assembly; } AssemblyName assemblyName = new AssemblyName(Name); _assembly = SafeSecurityHelper.GetLoadedAssembly(assemblyName); if (_assembly == null) { byte[] publicKeyToken = assemblyName.GetPublicKeyToken(); if (assemblyName.Version != null || assemblyName.CultureInfo != null || publicKeyToken != null) { try { _assembly = Assembly.Load(assemblyName.FullName); } catch { AssemblyName shortName = new AssemblyName(assemblyName.Name); if (publicKeyToken != null) { shortName.SetPublicKeyToken(publicKeyToken); } _assembly = Assembly.Load(shortName); } } else { _assembly = Assembly.LoadWithPartialName(assemblyName.Name); } } return _assembly; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MemberMemberBinding.cs
- UserPreferenceChangedEventArgs.cs
- HostVisual.cs
- ApplicationInfo.cs
- ProtocolsConfigurationEntry.cs
- PathSegmentCollection.cs
- Error.cs
- SystemEvents.cs
- DataGridViewDataConnection.cs
- RulePatternOps.cs
- StylusPointPropertyInfoDefaults.cs
- PrincipalPermission.cs
- PropertyItem.cs
- PersistNameAttribute.cs
- PathFigureCollectionConverter.cs
- DataServiceConfiguration.cs
- AuthStoreRoleProvider.cs
- ArithmeticLiteral.cs
- CaseInsensitiveOrdinalStringComparer.cs
- HMAC.cs
- LogReservationCollection.cs
- GroupItem.cs
- TreeViewImageIndexConverter.cs
- FtpWebResponse.cs
- CodeParameterDeclarationExpression.cs
- KeyboardNavigation.cs
- ConfigDefinitionUpdates.cs
- SqlSelectStatement.cs
- X509Chain.cs
- TextServicesPropertyRanges.cs
- DataSourceHelper.cs
- LazyTextWriterCreator.cs
- OleDbRowUpdatingEvent.cs
- ConstructorArgumentAttribute.cs
- Formatter.cs
- TypeUtil.cs
- ScriptingScriptResourceHandlerSection.cs
- FontInfo.cs
- MatrixValueSerializer.cs
- LassoSelectionBehavior.cs
- FormViewPageEventArgs.cs
- XmlArrayItemAttribute.cs
- Codec.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- MetadataPropertyAttribute.cs
- LiteralText.cs
- ColumnReorderedEventArgs.cs
- PropertyCollection.cs
- Substitution.cs
- WindowsIPAddress.cs
- ToolCreatedEventArgs.cs
- Int64Animation.cs
- ConfigXmlSignificantWhitespace.cs
- EntityTypeEmitter.cs
- DeviceSpecificDesigner.cs
- WebPartDescriptionCollection.cs
- LingerOption.cs
- TimeZoneNotFoundException.cs
- UnsafeNativeMethods.cs
- DES.cs
- BooleanConverter.cs
- ComponentEvent.cs
- WebPartTracker.cs
- DbXmlEnabledProviderManifest.cs
- ImmutableObjectAttribute.cs
- BackgroundWorker.cs
- _Rfc2616CacheValidators.cs
- ConnectionManagementSection.cs
- FormattedTextSymbols.cs
- Guid.cs
- BrushMappingModeValidation.cs
- NavigationEventArgs.cs
- ImageCodecInfo.cs
- basevalidator.cs
- METAHEADER.cs
- WindowsFormsSectionHandler.cs
- MailMessageEventArgs.cs
- StreamReader.cs
- XmlReaderSettings.cs
- SizeAnimationClockResource.cs
- OleDbCommand.cs
- InkCanvasFeedbackAdorner.cs
- IsolatedStorage.cs
- NativeMethods.cs
- SqlIdentifier.cs
- DesignerOptionService.cs
- Selection.cs
- CategoryNameCollection.cs
- TrackingLocationCollection.cs
- XmlReaderSettings.cs
- CapabilitiesRule.cs
- BaseConfigurationRecord.cs
- XmlObjectSerializerReadContextComplexJson.cs
- NativeMethods.cs
- LastQueryOperator.cs
- SymbolUsageManager.cs
- Compiler.cs
- _ConnectStream.cs
- DmlSqlGenerator.cs
- ClientTargetCollection.cs