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
- DuplexClientBase.cs
- ObjectRef.cs
- Utils.cs
- TextTreeText.cs
- UniqueEventHelper.cs
- ConcurrentDictionary.cs
- MaterialGroup.cs
- TextRange.cs
- PathSegment.cs
- OpenTypeMethods.cs
- CookieParameter.cs
- UrlSyndicationContent.cs
- UIElement.cs
- MulticastDelegate.cs
- KnownBoxes.cs
- Point4D.cs
- EntitySqlQueryCacheKey.cs
- TreeViewCancelEvent.cs
- GeometryGroup.cs
- PropertyEmitter.cs
- RuntimeHandles.cs
- HandoffBehavior.cs
- DigestComparer.cs
- DataListCommandEventArgs.cs
- Filter.cs
- LinqExpressionNormalizer.cs
- WebDisplayNameAttribute.cs
- ZipPackagePart.cs
- FontUnitConverter.cs
- DataServiceProcessingPipelineEventArgs.cs
- InputElement.cs
- MetadataArtifactLoaderCompositeFile.cs
- WebBrowserNavigatedEventHandler.cs
- ConnectionsZone.cs
- ListSortDescriptionCollection.cs
- CheckPair.cs
- SQLMoney.cs
- SectionInput.cs
- WorkflowRequestContext.cs
- VersionValidator.cs
- AccessedThroughPropertyAttribute.cs
- DiscoveryClientChannelBase.cs
- XPathDocumentIterator.cs
- RtfNavigator.cs
- ToolboxComponentsCreatedEventArgs.cs
- XamlStream.cs
- TextSpan.cs
- FontEmbeddingManager.cs
- MessageLogTraceRecord.cs
- httpapplicationstate.cs
- errorpatternmatcher.cs
- HostingPreferredMapPath.cs
- ProfileService.cs
- ExpandoObject.cs
- ContentPlaceHolder.cs
- AnnotationResource.cs
- RequestResizeEvent.cs
- MailMessage.cs
- Perspective.cs
- ExternalCalls.cs
- DataIdProcessor.cs
- LinqDataSourceSelectEventArgs.cs
- JsonGlobals.cs
- WinEventHandler.cs
- ParseHttpDate.cs
- CompilationRelaxations.cs
- FunctionUpdateCommand.cs
- LoadWorkflowByKeyAsyncResult.cs
- TemplateControlCodeDomTreeGenerator.cs
- UseAttributeSetsAction.cs
- ToolboxItem.cs
- InstanceDataCollection.cs
- ActivityExecutorSurrogate.cs
- FormsAuthenticationConfiguration.cs
- UrlPath.cs
- Rect3DConverter.cs
- SmuggledIUnknown.cs
- WebPartMenu.cs
- WindowsListViewItemCheckBox.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- HwndHostAutomationPeer.cs
- DiscoveryServiceExtension.cs
- sapiproxy.cs
- ServiceProviders.cs
- TransformProviderWrapper.cs
- AuthenticationSection.cs
- SqlXmlStorage.cs
- Cursor.cs
- Logging.cs
- Ppl.cs
- FederatedMessageSecurityOverHttpElement.cs
- ToolboxDataAttribute.cs
- AppSettingsExpressionBuilder.cs
- BitmapData.cs
- VirtualDirectoryMapping.cs
- DataSourceCache.cs
- HttpApplication.cs
- RankException.cs
- Mappings.cs
- ColumnResizeUndoUnit.cs