Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / XmlUtils / System / Xml / Xsl / QIL / QilName.cs / 1 / QilName.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Diagnostics; namespace System.Xml.Xsl.Qil { ////// View over a Qil name literal. /// ////// Don't construct QIL nodes directly; instead, use the internal class QilName : QilLiteral { private string local; private string uri; private string prefix; //----------------------------------------------- // Constructor //----------------------------------------------- ///QilFactory . ////// Construct a new node /// public QilName(QilNodeType nodeType, string local, string uri, string prefix) : base(nodeType, null) { LocalName = local; NamespaceUri = uri; Prefix = prefix; Value = this; } //----------------------------------------------- // QilName methods //----------------------------------------------- public string LocalName { get { return this.local; } set { this.local = value; } } public string NamespaceUri { get { return this.uri; } set { this.uri = value; } } public string Prefix { get { return this.prefix; } set { this.prefix = value; } } ////// Build the qualified name in the form prefix:local /// public string QualifiedName { get { if (this.prefix.Length == 0) { return this.local; } else { return this.prefix + ':' + this.local; } } } ////// Override GetHashCode() so that the QilName can be used as a key in the hashtable. /// ///Does not compare their prefixes (if any). public override int GetHashCode() { return this.local.GetHashCode(); } ////// Override Equals() so that the QilName can be used as a key in the hashtable. /// ///Does not compare their prefixes (if any). public override bool Equals(object other) { QilName name = other as QilName; if (name == null) return false; return this.local == name.local && this.uri == name.uri; } ////// Return the QilName in this format: "{namespace}prefix:local-name". /// If the namespace is empty, return the QilName in this truncated format: "local-name". /// If the prefix is empty, return the QilName in this truncated format: "{namespace}local-name". /// public override string ToString() { if (prefix.Length == 0) { if (uri.Length == 0) return local; return string.Concat("{", uri, "}", local); } return string.Concat("{", uri, "}", prefix, ":", local); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Diagnostics; namespace System.Xml.Xsl.Qil { ////// View over a Qil name literal. /// ////// Don't construct QIL nodes directly; instead, use the internal class QilName : QilLiteral { private string local; private string uri; private string prefix; //----------------------------------------------- // Constructor //----------------------------------------------- ///QilFactory . ////// Construct a new node /// public QilName(QilNodeType nodeType, string local, string uri, string prefix) : base(nodeType, null) { LocalName = local; NamespaceUri = uri; Prefix = prefix; Value = this; } //----------------------------------------------- // QilName methods //----------------------------------------------- public string LocalName { get { return this.local; } set { this.local = value; } } public string NamespaceUri { get { return this.uri; } set { this.uri = value; } } public string Prefix { get { return this.prefix; } set { this.prefix = value; } } ////// Build the qualified name in the form prefix:local /// public string QualifiedName { get { if (this.prefix.Length == 0) { return this.local; } else { return this.prefix + ':' + this.local; } } } ////// Override GetHashCode() so that the QilName can be used as a key in the hashtable. /// ///Does not compare their prefixes (if any). public override int GetHashCode() { return this.local.GetHashCode(); } ////// Override Equals() so that the QilName can be used as a key in the hashtable. /// ///Does not compare their prefixes (if any). public override bool Equals(object other) { QilName name = other as QilName; if (name == null) return false; return this.local == name.local && this.uri == name.uri; } ////// Return the QilName in this format: "{namespace}prefix:local-name". /// If the namespace is empty, return the QilName in this truncated format: "local-name". /// If the prefix is empty, return the QilName in this truncated format: "{namespace}local-name". /// public override string ToString() { if (prefix.Length == 0) { if (uri.Length == 0) return local; return string.Concat("{", uri, "}", local); } return string.Concat("{", uri, "}", prefix, ":", local); } } } // 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
- DiagnosticSection.cs
- TypedColumnHandler.cs
- SelectionWordBreaker.cs
- FormViewAutoFormat.cs
- SystemKeyConverter.cs
- StrokeCollection2.cs
- DataServiceRequestException.cs
- UnionCqlBlock.cs
- IConvertible.cs
- StorageInfo.cs
- InvalidOleVariantTypeException.cs
- HeaderedItemsControl.cs
- BufferedGraphics.cs
- ListDictionaryInternal.cs
- WindowsGraphics2.cs
- Utility.cs
- HandoffBehavior.cs
- StylusEditingBehavior.cs
- OutOfProcStateClientManager.cs
- DataRow.cs
- ConcatQueryOperator.cs
- SingleAnimationBase.cs
- WebScriptClientGenerator.cs
- HtmlString.cs
- Context.cs
- CalloutQueueItem.cs
- TcpClientSocketManager.cs
- PriorityQueue.cs
- ToolStripInSituService.cs
- InputLanguageCollection.cs
- TextureBrush.cs
- Deflater.cs
- EventLogEntryCollection.cs
- DateTimeConstantAttribute.cs
- EntityDataSourceSelectingEventArgs.cs
- LineUtil.cs
- ScriptControlManager.cs
- UnsignedPublishLicense.cs
- EntityWithChangeTrackerStrategy.cs
- WindowsSlider.cs
- DoubleCollection.cs
- ThreadStartException.cs
- XmlEncoding.cs
- exports.cs
- SystemIPv4InterfaceProperties.cs
- DataGridViewTextBoxEditingControl.cs
- DataGridPagerStyle.cs
- DES.cs
- FrameDimension.cs
- Knowncolors.cs
- TcpPortSharing.cs
- RijndaelManagedTransform.cs
- Visual3D.cs
- TracedNativeMethods.cs
- FileDataSourceCache.cs
- WmlCalendarAdapter.cs
- ConfigurationSectionGroup.cs
- HostedImpersonationContext.cs
- ResourceContainer.cs
- TimeSpan.cs
- UnsafeNativeMethodsPenimc.cs
- TCEAdapterGenerator.cs
- TreeViewAutomationPeer.cs
- NamespaceEmitter.cs
- SizeChangedInfo.cs
- UseLicense.cs
- DesignerVerbCollection.cs
- X509AudioLogo.cs
- ColumnWidthChangingEvent.cs
- DateTimeFormat.cs
- SineEase.cs
- SHA256Managed.cs
- EntityClassGenerator.cs
- XhtmlConformanceSection.cs
- TextEndOfSegment.cs
- XmlComplianceUtil.cs
- CodeVariableDeclarationStatement.cs
- ValidatorCompatibilityHelper.cs
- RuleInfoComparer.cs
- Script.cs
- KeyGestureValueSerializer.cs
- LocatorGroup.cs
- DataGridViewAutoSizeModeEventArgs.cs
- IsolatedStorageFilePermission.cs
- AsymmetricAlgorithm.cs
- ToolStripControlHost.cs
- baseaxisquery.cs
- InputMethodStateTypeInfo.cs
- DynamicFilterExpression.cs
- OleDbErrorCollection.cs
- CopyAttributesAction.cs
- RelationshipEntry.cs
- ConfigurationStrings.cs
- DbProviderConfigurationHandler.cs
- XmlSchemaParticle.cs
- FolderLevelBuildProviderCollection.cs
- StorageConditionPropertyMapping.cs
- MailDefinition.cs
- OpenTypeCommon.cs
- DecoderBestFitFallback.cs