Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- OutputCacheProviderCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- JapaneseLunisolarCalendar.cs
- TableRowGroupCollection.cs
- ActiveXHost.cs
- SoapHeader.cs
- CookielessHelper.cs
- RuleSettings.cs
- Point3D.cs
- ProvidersHelper.cs
- SafeNativeMethods.cs
- DataContractSerializerSection.cs
- XmlKeywords.cs
- Converter.cs
- LinqDataSourceInsertEventArgs.cs
- AutomationPropertyInfo.cs
- nulltextcontainer.cs
- PropertyDescriptor.cs
- _DomainName.cs
- DataGridPageChangedEventArgs.cs
- PocoPropertyAccessorStrategy.cs
- RedBlackList.cs
- EntityCollection.cs
- COM2ColorConverter.cs
- CodeDomLoader.cs
- WebPartEditorApplyVerb.cs
- HtmlEncodedRawTextWriter.cs
- HostDesigntimeLicenseContext.cs
- EntityDataSourceChangedEventArgs.cs
- CodeGenerator.cs
- ZipQueryOperator.cs
- GlobalDataBindingHandler.cs
- RawStylusInputReport.cs
- PTConverter.cs
- HttpPostServerProtocol.cs
- ResourcesBuildProvider.cs
- X509ThumbprintKeyIdentifierClause.cs
- DataGridViewRowPrePaintEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- ReaderContextStackData.cs
- SchemaElementDecl.cs
- DuplicateWaitObjectException.cs
- SetterBaseCollection.cs
- PaperSize.cs
- HitTestResult.cs
- Common.cs
- ConditionalBranch.cs
- CommandManager.cs
- CqlGenerator.cs
- UniqueID.cs
- PeerEndPoint.cs
- FrameworkElementFactoryMarkupObject.cs
- RectAnimation.cs
- XPathMessageFilterElement.cs
- DataBindingList.cs
- ColorConverter.cs
- SoapCommonClasses.cs
- XmlSchemaSimpleContentExtension.cs
- IgnoreFileBuildProvider.cs
- CustomWebEventKey.cs
- ProcessHost.cs
- GridViewColumnCollection.cs
- ToolStripContentPanelRenderEventArgs.cs
- PropertyMap.cs
- StructuredTypeEmitter.cs
- ToolStripButton.cs
- Rotation3D.cs
- DataServiceRequestArgs.cs
- Wizard.cs
- SqlUDTStorage.cs
- CompoundFileDeflateTransform.cs
- PropertyDescriptorCollection.cs
- SQLDecimalStorage.cs
- IdentityModelStringsVersion1.cs
- MobileErrorInfo.cs
- FileLogRecordStream.cs
- Misc.cs
- SchemaObjectWriter.cs
- SiblingIterators.cs
- PointConverter.cs
- ConfigurationProperty.cs
- CheckBox.cs
- ExceptionCollection.cs
- BitmapCodecInfoInternal.cs
- CodeCompileUnit.cs
- OdbcConnectionString.cs
- TopClause.cs
- HtmlInputText.cs
- SoapSchemaExporter.cs
- TreeViewAutomationPeer.cs
- EmptyEnumerable.cs
- RequiredAttributeAttribute.cs
- SafeBitVector32.cs
- DataGridColumn.cs
- UIPermission.cs
- ClientBuildManager.cs
- ProfilePropertyNameValidator.cs
- DataGridViewRowHeaderCell.cs
- StaticExtension.cs
- URLAttribute.cs