Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / XmlUtils / System / Xml / Xsl / Runtime / EarlyBoundInfo.cs / 1 / 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. //------------------------------------------------------------------------------ //// 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
- XmlException.cs
- util.cs
- basecomparevalidator.cs
- ObjectDataSourceChooseTypePanel.cs
- Matrix3D.cs
- ColumnReorderedEventArgs.cs
- DataServiceEntityAttribute.cs
- MenuEventArgs.cs
- PersonalizablePropertyEntry.cs
- SecurityTokenResolver.cs
- StateMachineSubscription.cs
- Transactions.cs
- ArithmeticException.cs
- PointHitTestResult.cs
- _emptywebproxy.cs
- TopClause.cs
- DataObjectAttribute.cs
- WebReferencesBuildProvider.cs
- HttpCacheVary.cs
- DeviceContexts.cs
- WebPartCancelEventArgs.cs
- PageCanvasSize.cs
- QuotedPrintableStream.cs
- EntitySetBaseCollection.cs
- CallContext.cs
- ProfileManager.cs
- FragmentQueryKB.cs
- VirtualDirectoryMappingCollection.cs
- GridViewDeleteEventArgs.cs
- CapabilitiesState.cs
- AcceleratedTokenProviderState.cs
- BamlRecordWriter.cs
- BackgroundFormatInfo.cs
- ColumnCollection.cs
- CachedPathData.cs
- ListParagraph.cs
- TrailingSpaceComparer.cs
- EdmItemCollection.cs
- OdbcParameterCollection.cs
- SiteMembershipCondition.cs
- LinkedList.cs
- PixelShader.cs
- TableDetailsCollection.cs
- CDSsyncETWBCLProvider.cs
- TriState.cs
- WindowsSolidBrush.cs
- CopyOnWriteList.cs
- QuestionEventArgs.cs
- UnmanagedMemoryStream.cs
- ComponentCollection.cs
- IWorkflowDebuggerService.cs
- RegexReplacement.cs
- HttpCapabilitiesBase.cs
- ClientOptions.cs
- TypeBinaryExpression.cs
- FilterQueryOptionExpression.cs
- XmlSchemaSubstitutionGroup.cs
- TransformerInfoCollection.cs
- MediaTimeline.cs
- PropertyGroupDescription.cs
- XmlBoundElement.cs
- VisualProxy.cs
- backend.cs
- EventMap.cs
- GridLengthConverter.cs
- Monitor.cs
- FusionWrap.cs
- EnterpriseServicesHelper.cs
- StrokeDescriptor.cs
- StringCollectionEditor.cs
- UidManager.cs
- XmlWhitespace.cs
- PropertyChangedEventArgs.cs
- IconConverter.cs
- CalendarButtonAutomationPeer.cs
- TextAutomationPeer.cs
- DebuggerService.cs
- InvokeSchedule.cs
- pingexception.cs
- FontWeights.cs
- SequentialOutput.cs
- DrawingGroupDrawingContext.cs
- Int32Rect.cs
- DataGridDesigner.cs
- CurrencyWrapper.cs
- TargetFrameworkAttribute.cs
- AutoGeneratedFieldProperties.cs
- XmlBinaryReaderSession.cs
- DrawingAttributesDefaultValueFactory.cs
- DatePickerDateValidationErrorEventArgs.cs
- ExternalException.cs
- ProfilePropertyMetadata.cs
- CustomPopupPlacement.cs
- ScrollViewerAutomationPeer.cs
- ToolStripDropDownItem.cs
- ServiceBusyException.cs
- VarInfo.cs
- DllNotFoundException.cs
- WorkflowMarkupElementEventArgs.cs
- DrawingAttributesDefaultValueFactory.cs