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
- InOutArgumentConverter.cs
- ObjectItemCachedAssemblyLoader.cs
- StrokeDescriptor.cs
- UrlAuthFailedErrorFormatter.cs
- CustomErrorsSection.cs
- BaseParser.cs
- XmlStrings.cs
- Typeface.cs
- PrinterResolution.cs
- ContextMenuStrip.cs
- diagnosticsswitches.cs
- DesignerVerb.cs
- IteratorFilter.cs
- LocationSectionRecord.cs
- ButtonAutomationPeer.cs
- View.cs
- DataGridViewSelectedCellCollection.cs
- ConfigurationStrings.cs
- WebHttpEndpoint.cs
- IndicFontClient.cs
- ClientBuildManager.cs
- UnsafeNativeMethods.cs
- TypeRefElement.cs
- StateChangeEvent.cs
- PropertyInfoSet.cs
- CodeArgumentReferenceExpression.cs
- EntitySqlQueryCacheKey.cs
- ClassHandlersStore.cs
- SetterBaseCollection.cs
- LocatorBase.cs
- CopyAction.cs
- AudioException.cs
- ProviderException.cs
- HtmlFormParameterWriter.cs
- RelationshipManager.cs
- BindingElementExtensionElement.cs
- Error.cs
- SapiRecoContext.cs
- BmpBitmapEncoder.cs
- TextFindEngine.cs
- BaseValidatorDesigner.cs
- ListViewGroup.cs
- RsaSecurityKey.cs
- CopyAction.cs
- DataRowComparer.cs
- GridViewRow.cs
- HttpRuntimeSection.cs
- InputScope.cs
- Knowncolors.cs
- PropertyDescriptorCollection.cs
- ThreadInterruptedException.cs
- DependencyObjectProvider.cs
- ValidationHelpers.cs
- ObjectAnimationUsingKeyFrames.cs
- MatrixTransform.cs
- RC2CryptoServiceProvider.cs
- SecurityKeyUsage.cs
- TypographyProperties.cs
- BindingNavigator.cs
- HashStream.cs
- NamedPermissionSet.cs
- WindowsToolbarItemAsMenuItem.cs
- ReflectionUtil.cs
- CodeExpressionStatement.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- WindowsToolbar.cs
- BuilderElements.cs
- PrintDialogException.cs
- XamlClipboardData.cs
- DragDrop.cs
- UniqueConstraint.cs
- PatternMatcher.cs
- GeometryDrawing.cs
- CharacterShapingProperties.cs
- CharacterHit.cs
- WpfPayload.cs
- Task.cs
- Brush.cs
- SafeHandles.cs
- DataGridViewMethods.cs
- ActivityCompletionCallbackWrapper.cs
- OrderedDictionary.cs
- ColorAnimation.cs
- ListBindingConverter.cs
- GroupItemAutomationPeer.cs
- HWStack.cs
- DbDataAdapter.cs
- ToolTipAutomationPeer.cs
- DecoderNLS.cs
- MailMessageEventArgs.cs
- MsmqNonTransactedPoisonHandler.cs
- ComponentChangingEvent.cs
- BitmapEffectDrawingContextState.cs
- Repeater.cs
- TextAction.cs
- SchemaNotation.cs
- HtmlTextArea.cs
- GridViewEditEventArgs.cs
- FormsAuthenticationUserCollection.cs
- InvalidPropValue.cs