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
- Decorator.cs
- ClientScriptManager.cs
- DockPanel.cs
- ObjectSecurityT.cs
- AlphaSortedEnumConverter.cs
- ScrollChangedEventArgs.cs
- OdbcConnectionOpen.cs
- GridItemCollection.cs
- ExtendedPropertyCollection.cs
- DrawingAttributesDefaultValueFactory.cs
- IIS7WorkerRequest.cs
- DispatcherExceptionEventArgs.cs
- ButtonFlatAdapter.cs
- Point3DCollectionValueSerializer.cs
- RuntimeHandles.cs
- GetIndexBinder.cs
- _TLSstream.cs
- XmlHelper.cs
- TCPListener.cs
- MailMessageEventArgs.cs
- Icon.cs
- TextSchema.cs
- ManagedWndProcTracker.cs
- DataGrid.cs
- EntityDataSourceSelectingEventArgs.cs
- WebBrowsableAttribute.cs
- LineMetrics.cs
- DataGridPagerStyle.cs
- ServiceMetadataExtension.cs
- XmlReflectionImporter.cs
- LoadWorkflowByInstanceKeyCommand.cs
- Models.cs
- InputScopeAttribute.cs
- DetailsViewCommandEventArgs.cs
- DataListItemEventArgs.cs
- ValueQuery.cs
- WmpBitmapDecoder.cs
- GradientSpreadMethodValidation.cs
- FunctionImportMapping.cs
- ShapingEngine.cs
- EventEntry.cs
- CodePropertyReferenceExpression.cs
- QueryInterceptorAttribute.cs
- TripleDESCryptoServiceProvider.cs
- ImmutableDispatchRuntime.cs
- TextPatternIdentifiers.cs
- WindowsTab.cs
- PeerChannelFactory.cs
- CursorConverter.cs
- _ConnectStream.cs
- WebServiceErrorEvent.cs
- CqlParser.cs
- ToolStripSeparatorRenderEventArgs.cs
- CacheChildrenQuery.cs
- MemoryFailPoint.cs
- Transform.cs
- RoutedEventHandlerInfo.cs
- __ComObject.cs
- OLEDB_Util.cs
- SqlDataRecord.cs
- CacheVirtualItemsEvent.cs
- CallbackHandler.cs
- CategoryAttribute.cs
- ObfuscationAttribute.cs
- FormViewInsertedEventArgs.cs
- Model3D.cs
- Utils.cs
- XmlRootAttribute.cs
- CodeTypeParameter.cs
- ErrorFormatterPage.cs
- ControlLocalizer.cs
- SocketException.cs
- CommandBinding.cs
- EncoderParameter.cs
- AdRotatorDesigner.cs
- MaterialCollection.cs
- ResourceKey.cs
- HtmlTextArea.cs
- XmlWrappingWriter.cs
- QuaternionAnimationBase.cs
- ObjectDataSourceStatusEventArgs.cs
- ByteKeyFrameCollection.cs
- AttributeQuery.cs
- DataGridViewRowsAddedEventArgs.cs
- AppDomainEvidenceFactory.cs
- RouteParser.cs
- XamlPointCollectionSerializer.cs
- HostingEnvironmentException.cs
- StateDesigner.CommentLayoutGlyph.cs
- HashCodeCombiner.cs
- URL.cs
- PersonalizationProviderHelper.cs
- QuaternionAnimation.cs
- ListenerConstants.cs
- Matrix.cs
- Attribute.cs
- Polygon.cs
- DataGridColumnCollection.cs
- StringDictionaryEditor.cs
- Collection.cs