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
- BrowserCapabilitiesFactory.cs
- FuncCompletionCallbackWrapper.cs
- HttpVersion.cs
- MasterPageCodeDomTreeGenerator.cs
- RangeValueProviderWrapper.cs
- LinearKeyFrames.cs
- ColumnMapCopier.cs
- IsolatedStorageFilePermission.cs
- SortDescription.cs
- DataObject.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- WorkflowValidationFailedException.cs
- DataTableTypeConverter.cs
- ListItemCollection.cs
- XmlSerializerVersionAttribute.cs
- LogLogRecordHeader.cs
- ComboBoxItem.cs
- PublishLicense.cs
- Repeater.cs
- DataGridViewRowStateChangedEventArgs.cs
- CaseInsensitiveHashCodeProvider.cs
- Literal.cs
- PresentationSource.cs
- WebPageTraceListener.cs
- ScriptControl.cs
- Pen.cs
- Icon.cs
- UnsafeNativeMethods.cs
- WebZone.cs
- QilTernary.cs
- TemplateComponentConnector.cs
- SymDocumentType.cs
- GraphicsPath.cs
- ManifestResourceInfo.cs
- SqlErrorCollection.cs
- ContextActivityUtils.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ExtensionWindowResizeGrip.cs
- Unit.cs
- XmlSiteMapProvider.cs
- BamlTreeUpdater.cs
- TemplatedMailWebEventProvider.cs
- TableItemProviderWrapper.cs
- ConfigXmlReader.cs
- SwitchExpression.cs
- SQLSingleStorage.cs
- BuildDependencySet.cs
- XmlDocumentSerializer.cs
- ScriptControlManager.cs
- ServerValidateEventArgs.cs
- TransportSecurityProtocolFactory.cs
- ProtocolsConfigurationEntry.cs
- Trace.cs
- TaiwanLunisolarCalendar.cs
- XsltSettings.cs
- ObjectHelper.cs
- MethodToken.cs
- RegexGroup.cs
- WinFormsSpinner.cs
- WinInetCache.cs
- SqlBulkCopyColumnMappingCollection.cs
- ContentOperations.cs
- MediaElement.cs
- InnerItemCollectionView.cs
- EventsTab.cs
- WebZone.cs
- BindableTemplateBuilder.cs
- SemanticResolver.cs
- SubqueryRules.cs
- IndexOutOfRangeException.cs
- xsdvalidator.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Lasso.cs
- RoutedEventArgs.cs
- ColorConvertedBitmap.cs
- SimpleHandlerFactory.cs
- ConfigurationProperty.cs
- SqlReferenceCollection.cs
- SerializationAttributes.cs
- XmlStreamStore.cs
- SapiInterop.cs
- DateRangeEvent.cs
- DigestComparer.cs
- WebHeaderCollection.cs
- ConfigurationValue.cs
- IListConverters.cs
- ListView.cs
- EffectiveValueEntry.cs
- BezierSegment.cs
- ConfigurationFileMap.cs
- AsyncInvokeContext.cs
- ThousandthOfEmRealPoints.cs
- BitmapEffectOutputConnector.cs
- LongValidator.cs
- KeyProperty.cs
- ObjectDataSourceStatusEventArgs.cs
- ProfileGroupSettingsCollection.cs
- StateMachine.cs
- ZipIOCentralDirectoryBlock.cs
- ColumnHeaderCollectionEditor.cs