Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / Runtime / EarlyBoundInfo.cs / 1305376 / EarlyBoundInfo.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System.Diagnostics; using System.Reflection; namespace System.Xml.Xsl.Runtime { ////// This class contains information about early bound function objects. /// internal sealed class EarlyBoundInfo { private string namespaceUri; // Namespace Uri mapped to these early bound functions private ConstructorInfo constrInfo; // Constructor for the early bound function object public EarlyBoundInfo(string namespaceUri, Type ebType) { Debug.Assert(namespaceUri != null && ebType != null); // Get the default constructor this.namespaceUri = namespaceUri; this.constrInfo = ebType.GetConstructor(Type.EmptyTypes); Debug.Assert(this.constrInfo != null, "The early bound object type " + ebType.FullName + " must have a public default constructor"); } ////// Get the Namespace Uri mapped to these early bound functions. /// public string NamespaceUri { get { return this.namespaceUri; } } ////// Return the Clr Type of the early bound object. /// public Type EarlyBoundType { get { return this.constrInfo.DeclaringType; } } ////// Create an instance of the early bound object. /// public object CreateObject() { return this.constrInfo.Invoke(new object[] {}); } ////// Override Equals method so that EarlyBoundInfo to implement value comparison. /// public override bool Equals(object obj) { EarlyBoundInfo info = obj as EarlyBoundInfo; if (info == null) return false; return this.namespaceUri == info.namespaceUri && this.constrInfo == info.constrInfo; } ////// Override GetHashCode since Equals is overriden. /// public override int GetHashCode() { return this.namespaceUri.GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Point3DIndependentAnimationStorage.cs
- CommandBindingCollection.cs
- XmlSchemaType.cs
- SoapReflectionImporter.cs
- TemplateEditingVerb.cs
- CultureNotFoundException.cs
- WorkflowElementDialog.cs
- IPCCacheManager.cs
- UnsafeNativeMethods.cs
- CqlGenerator.cs
- COM2EnumConverter.cs
- MessageDecoder.cs
- MsmqIntegrationSecurityElement.cs
- MyContact.cs
- LateBoundBitmapDecoder.cs
- DesignTimeHTMLTextWriter.cs
- XsdBuildProvider.cs
- SourceSwitch.cs
- CompiledQueryCacheEntry.cs
- WindowsGraphicsCacheManager.cs
- CompressEmulationStream.cs
- SqlBulkCopy.cs
- StreamMarshaler.cs
- MulticastNotSupportedException.cs
- HttpListenerException.cs
- SourceFileBuildProvider.cs
- XPathCompileException.cs
- StreamWriter.cs
- EnvironmentPermission.cs
- NameValueSectionHandler.cs
- JournalEntryStack.cs
- NameScopePropertyAttribute.cs
- BridgeDataReader.cs
- ConfigurationException.cs
- XmlNode.cs
- ImportCatalogPart.cs
- Unit.cs
- KeyEventArgs.cs
- RuntimeHandles.cs
- TreeViewCancelEvent.cs
- Memoizer.cs
- MethodBody.cs
- DataGridColumnFloatingHeader.cs
- GroupPartitionExpr.cs
- InvalidDataContractException.cs
- MessageCredentialType.cs
- SchemaTypeEmitter.cs
- ApplicationTrust.cs
- SelectedDatesCollection.cs
- DurableEnlistmentState.cs
- OverflowException.cs
- DynamicVirtualDiscoSearcher.cs
- SecureStringHasher.cs
- AddValidationError.cs
- ColumnWidthChangingEvent.cs
- WebServiceParameterData.cs
- Attributes.cs
- Main.cs
- InterleavedZipPartStream.cs
- MeasurementDCInfo.cs
- DynamicDataRoute.cs
- PackageDigitalSignatureManager.cs
- ObjectCloneHelper.cs
- TextSelectionHelper.cs
- PerformanceCountersBase.cs
- httpstaticobjectscollection.cs
- HelloMessageApril2005.cs
- BigInt.cs
- ThreadNeutralSemaphore.cs
- TokenBasedSetEnumerator.cs
- ManagedIStream.cs
- SqlDataAdapter.cs
- CallSite.cs
- Oid.cs
- XmlToDatasetMap.cs
- UIElementHelper.cs
- URIFormatException.cs
- DesignerDataColumn.cs
- OutputChannel.cs
- Gdiplus.cs
- UnsafeNativeMethods.cs
- HtmlElementCollection.cs
- DefaultPrintController.cs
- PieceDirectory.cs
- Vector3DAnimationBase.cs
- ListParagraph.cs
- ArgumentElement.cs
- Logging.cs
- ExeContext.cs
- WorkflowViewService.cs
- NamedElement.cs
- ToolBarTray.cs
- WindowsProgressbar.cs
- SqlSupersetValidator.cs
- StylusButtonEventArgs.cs
- DirectoryRootQuery.cs
- RotationValidation.cs
- DataGridCheckBoxColumn.cs
- AddInProcess.cs
- IItemProperties.cs