Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DllNotFoundException.cs
- TextModifier.cs
- DiscreteKeyFrames.cs
- StorageInfo.cs
- HandlerFactoryWrapper.cs
- CompilationRelaxations.cs
- ByteFacetDescriptionElement.cs
- CodeTypeDeclaration.cs
- unsafenativemethodsother.cs
- Funcletizer.cs
- StringPropertyBuilder.cs
- GeneralTransform.cs
- AdornerHitTestResult.cs
- RepeaterItem.cs
- DiagnosticStrings.cs
- SafeMemoryMappedViewHandle.cs
- DateTimeValueSerializerContext.cs
- TaskHelper.cs
- PropVariant.cs
- ItemsChangedEventArgs.cs
- QilName.cs
- IndicShape.cs
- TextBox.cs
- DBSchemaTable.cs
- PropertyFilterAttribute.cs
- XMLSchema.cs
- TextChangedEventArgs.cs
- DataColumnMapping.cs
- ResolveNameEventArgs.cs
- CachedRequestParams.cs
- fixedPageContentExtractor.cs
- SessionStateItemCollection.cs
- GetResponse.cs
- StateMachineSubscription.cs
- SmiMetaDataProperty.cs
- QilInvoke.cs
- FormsAuthenticationConfiguration.cs
- RoleGroupCollection.cs
- MimeTypePropertyAttribute.cs
- Crc32.cs
- HScrollBar.cs
- CodeVariableReferenceExpression.cs
- DataGridToolTip.cs
- DropDownHolder.cs
- UriTemplateDispatchFormatter.cs
- Button.cs
- SelectedGridItemChangedEvent.cs
- TreeNodeBindingDepthConverter.cs
- Int32CollectionConverter.cs
- Thread.cs
- SqlParameterizer.cs
- FixedSOMGroup.cs
- LocalizableAttribute.cs
- WebEventTraceProvider.cs
- _HTTPDateParse.cs
- PanelDesigner.cs
- XmlSchemaAttributeGroupRef.cs
- IdleTimeoutMonitor.cs
- JsonCollectionDataContract.cs
- LookupTables.cs
- ComPlusThreadInitializer.cs
- BuildProviderAppliesToAttribute.cs
- RecognizeCompletedEventArgs.cs
- UniqueID.cs
- GridViewHeaderRowPresenter.cs
- Claim.cs
- DataServiceException.cs
- TextFragmentEngine.cs
- ExpandableObjectConverter.cs
- ParameterInfo.cs
- RegexGroupCollection.cs
- DataGridViewSortCompareEventArgs.cs
- AddressHeader.cs
- TcpTransportManager.cs
- UnauthorizedWebPart.cs
- CssClassPropertyAttribute.cs
- FormatVersion.cs
- DataBoundControlAdapter.cs
- RoutedPropertyChangedEventArgs.cs
- XD.cs
- XmlBinaryReader.cs
- HMAC.cs
- XmlSchemaAppInfo.cs
- DbDeleteCommandTree.cs
- BasicDesignerLoader.cs
- DrawToolTipEventArgs.cs
- _AutoWebProxyScriptHelper.cs
- HasCopySemanticsAttribute.cs
- DBSchemaRow.cs
- ToolStripItemTextRenderEventArgs.cs
- MdiWindowListItemConverter.cs
- KeyFrames.cs
- RepeaterCommandEventArgs.cs
- XmlSchemaValidationException.cs
- EntityCommandExecutionException.cs
- StatusBarDrawItemEvent.cs
- DisplayNameAttribute.cs
- NCryptSafeHandles.cs
- PopupEventArgs.cs
- RangeValuePattern.cs