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
- DecimalFormatter.cs
- MatrixAnimationBase.cs
- SslStream.cs
- SemanticResolver.cs
- PropertyGridEditorPart.cs
- ImageAnimator.cs
- XmlRawWriterWrapper.cs
- NegotiationTokenProvider.cs
- BinaryObjectReader.cs
- UserMapPath.cs
- xmlfixedPageInfo.cs
- ProgressChangedEventArgs.cs
- ScriptControl.cs
- SafeNativeMethods.cs
- SerialPinChanges.cs
- HiddenFieldPageStatePersister.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- SendMessageChannelCache.cs
- DataGridView.cs
- TaskFormBase.cs
- RtfFormatStack.cs
- CompilerScopeManager.cs
- TypeBrowser.xaml.cs
- FormViewRow.cs
- GridSplitterAutomationPeer.cs
- Convert.cs
- Keywords.cs
- EntityDataSourceDataSelectionPanel.cs
- PreProcessor.cs
- EventMappingSettingsCollection.cs
- DataSourceDesigner.cs
- SevenBitStream.cs
- SoapSchemaExporter.cs
- FullTextBreakpoint.cs
- TreeViewItemAutomationPeer.cs
- SchemaObjectWriter.cs
- LayoutDump.cs
- MemberDescriptor.cs
- IdentityValidationException.cs
- CodeIdentifier.cs
- Accessible.cs
- CodeMemberMethod.cs
- TraceUtility.cs
- QilInvokeLateBound.cs
- RegistryKey.cs
- ApplicationDirectory.cs
- ObjectDataSourceStatusEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- _BaseOverlappedAsyncResult.cs
- HashCodeCombiner.cs
- xdrvalidator.cs
- SqlIdentifier.cs
- RegexCapture.cs
- CompoundFileDeflateTransform.cs
- DiagnosticTraceSource.cs
- HwndAppCommandInputProvider.cs
- XmlNode.cs
- CngAlgorithmGroup.cs
- ExpressionEditorAttribute.cs
- EntityDataSourceMemberPath.cs
- DecimalConverter.cs
- KeyProperty.cs
- ParameterBuilder.cs
- BulletChrome.cs
- DataControlFieldTypeEditor.cs
- RemotingSurrogateSelector.cs
- UrlMappingsModule.cs
- CryptoApi.cs
- XmlAttribute.cs
- TaskCanceledException.cs
- BasePattern.cs
- ServicePointManagerElement.cs
- SqlWebEventProvider.cs
- HostedElements.cs
- QueryResult.cs
- FrameworkElement.cs
- RewritingProcessor.cs
- BaseParaClient.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- TextServicesProperty.cs
- DataBindingsDialog.cs
- DataMemberAttribute.cs
- StringResourceManager.cs
- OneToOneMappingSerializer.cs
- Buffer.cs
- DigitShape.cs
- ClientSettings.cs
- FloaterBaseParagraph.cs
- ToolstripProfessionalRenderer.cs
- XmlWriterTraceListener.cs
- SnapLine.cs
- SubqueryTrackingVisitor.cs
- FormsAuthenticationUserCollection.cs
- SQLBinaryStorage.cs
- NotifyInputEventArgs.cs
- MediaTimeline.cs
- ToolBarButtonClickEvent.cs
- DriveInfo.cs
- XmlQueryCardinality.cs
- NativeMethodsCLR.cs