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
- BinHexDecoder.cs
- RegisteredDisposeScript.cs
- SoapObjectWriter.cs
- MobileControlDesigner.cs
- DictionaryEntry.cs
- TypeUtil.cs
- X509CertificateValidationMode.cs
- ResponseStream.cs
- NamespaceImport.cs
- UrlMappingCollection.cs
- IPAddress.cs
- WebServiceParameterData.cs
- LinkLabelLinkClickedEvent.cs
- CryptoHelper.cs
- FullTextBreakpoint.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- CompressEmulationStream.cs
- DbConnectionFactory.cs
- ProcessModuleCollection.cs
- TransformerConfigurationWizardBase.cs
- EntityRecordInfo.cs
- LifetimeServices.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PointConverter.cs
- SoapObjectReader.cs
- CLRBindingWorker.cs
- DataReceivedEventArgs.cs
- QueueSurrogate.cs
- DetailsViewPagerRow.cs
- PackagePartCollection.cs
- DbConnectionPoolOptions.cs
- TextDpi.cs
- SystemIPGlobalStatistics.cs
- UInt16.cs
- PageStatePersister.cs
- ServiceModelExtensionElement.cs
- Content.cs
- DataGridViewLayoutData.cs
- UTF32Encoding.cs
- ExpandableObjectConverter.cs
- EnumMemberAttribute.cs
- DummyDataSource.cs
- NumberSubstitution.cs
- XmlSchemaAttribute.cs
- IssuerInformation.cs
- EncodingTable.cs
- TypeSource.cs
- BindingContext.cs
- HybridObjectCache.cs
- DataFormat.cs
- QueryExpr.cs
- XAMLParseException.cs
- Journaling.cs
- ScaleTransform.cs
- CodePageEncoding.cs
- _AuthenticationState.cs
- Crc32.cs
- StickyNote.cs
- PointHitTestParameters.cs
- SmtpMail.cs
- FontResourceCache.cs
- XmlSchemaFacet.cs
- ScrollContentPresenter.cs
- SoapReflectionImporter.cs
- TrackingProfileCache.cs
- LingerOption.cs
- PreviewKeyDownEventArgs.cs
- WithParamAction.cs
- SecurityDescriptor.cs
- SqlCacheDependencyDatabase.cs
- TypeSemantics.cs
- RtfControls.cs
- ParameterBuilder.cs
- ChannelServices.cs
- httpserverutility.cs
- BitmapInitialize.cs
- CodeStatement.cs
- IDReferencePropertyAttribute.cs
- ValueTypeFixupInfo.cs
- SqlReorderer.cs
- SrgsItemList.cs
- AdRotatorDesigner.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- Grammar.cs
- HtmlMeta.cs
- EpmAttributeNameBuilder.cs
- XmlSiteMapProvider.cs
- MediaTimeline.cs
- CaseStatementSlot.cs
- TextAnchor.cs
- TextElementCollectionHelper.cs
- XpsSerializationException.cs
- NodeLabelEditEvent.cs
- RotationValidation.cs
- PhonemeConverter.cs
- PlainXmlWriter.cs
- OrderingQueryOperator.cs
- TextSegment.cs
- prompt.cs
- DecimalStorage.cs