Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / schema / SchemaEntity.cs / 1305376 / SchemaEntity.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System; using System.Diagnostics; internal sealed class SchemaEntity : IDtdEntityInfo { private XmlQualifiedName qname; // Name of entity private String url; // Url for external entity (system id) private String pubid; // Pubid for external entity private String text; // Text for internal entity private XmlQualifiedName ndata = XmlQualifiedName.Empty; // NDATA identifier private int lineNumber; // line number private int linePosition; // character postion private bool isParameter; // parameter entity flag private bool isExternal; // external entity flag private bool parsingInProgress; // whether entity is being parsed (DtdParser infinite recursion check) private bool isDeclaredInExternal; // declared in external markup or not private string baseURI; private string declaredURI; // // Constructor // internal SchemaEntity(XmlQualifiedName qname, bool isParameter) { this.qname = qname; this.isParameter = isParameter; } // // IDtdEntityInfo interface // #region IDtdEntityInfo Members string IDtdEntityInfo.Name { get { return this.Name.Name; } } bool IDtdEntityInfo.IsExternal { get { return ((SchemaEntity)this).IsExternal;} } bool IDtdEntityInfo.IsDeclaredInExternal { get { return this.DeclaredInExternal; } } bool IDtdEntityInfo.IsUnparsedEntity { get { return !this.NData.IsEmpty; } } bool IDtdEntityInfo.IsParameterEntity { get { return isParameter; } } string IDtdEntityInfo.BaseUriString { get { return this.BaseURI; } } string IDtdEntityInfo.DeclaredUriString { get { return this.DeclaredURI; } } string IDtdEntityInfo.SystemId { get { return this.Url; } } string IDtdEntityInfo.PublicId { get { return this.Pubid; } } string IDtdEntityInfo.Text { get { return ((SchemaEntity)this).Text; } } int IDtdEntityInfo.LineNumber { get { return this.Line; } } int IDtdEntityInfo.LinePosition { get { return this.Pos; } } #endregion // // Internal methods and properties // #if !SILVERLIGHT internal static bool IsPredefinedEntity(String n) { return(n == "lt" || n == "gt" || n == "amp" || n == "apos" || n == "quot"); } #endif internal XmlQualifiedName Name { get { return qname; } } internal String Url { get { return url;} set { url = value; isExternal = true;} } internal String Pubid { get { return pubid;} set { pubid = value;} } internal bool IsExternal { get { return isExternal; } set { isExternal = value; } } internal bool DeclaredInExternal { get { return isDeclaredInExternal; } set { isDeclaredInExternal = value; } } internal XmlQualifiedName NData { get { return ndata;} set { ndata = value;} } internal String Text { get { return text;} set { text = value; isExternal = false;} } internal int Line { get { return lineNumber;} set { lineNumber = value;} } internal int Pos { get { return linePosition;} set { linePosition = value;} } internal String BaseURI { get { return (baseURI == null) ? String.Empty : baseURI; } set { baseURI = value; } } internal bool ParsingInProgress { get { return parsingInProgress; } set { parsingInProgress = value; } } internal String DeclaredURI { get { return (declaredURI == null) ? String.Empty : declaredURI; } set { declaredURI = value; } } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System; using System.Diagnostics; internal sealed class SchemaEntity : IDtdEntityInfo { private XmlQualifiedName qname; // Name of entity private String url; // Url for external entity (system id) private String pubid; // Pubid for external entity private String text; // Text for internal entity private XmlQualifiedName ndata = XmlQualifiedName.Empty; // NDATA identifier private int lineNumber; // line number private int linePosition; // character postion private bool isParameter; // parameter entity flag private bool isExternal; // external entity flag private bool parsingInProgress; // whether entity is being parsed (DtdParser infinite recursion check) private bool isDeclaredInExternal; // declared in external markup or not private string baseURI; private string declaredURI; // // Constructor // internal SchemaEntity(XmlQualifiedName qname, bool isParameter) { this.qname = qname; this.isParameter = isParameter; } // // IDtdEntityInfo interface // #region IDtdEntityInfo Members string IDtdEntityInfo.Name { get { return this.Name.Name; } } bool IDtdEntityInfo.IsExternal { get { return ((SchemaEntity)this).IsExternal;} } bool IDtdEntityInfo.IsDeclaredInExternal { get { return this.DeclaredInExternal; } } bool IDtdEntityInfo.IsUnparsedEntity { get { return !this.NData.IsEmpty; } } bool IDtdEntityInfo.IsParameterEntity { get { return isParameter; } } string IDtdEntityInfo.BaseUriString { get { return this.BaseURI; } } string IDtdEntityInfo.DeclaredUriString { get { return this.DeclaredURI; } } string IDtdEntityInfo.SystemId { get { return this.Url; } } string IDtdEntityInfo.PublicId { get { return this.Pubid; } } string IDtdEntityInfo.Text { get { return ((SchemaEntity)this).Text; } } int IDtdEntityInfo.LineNumber { get { return this.Line; } } int IDtdEntityInfo.LinePosition { get { return this.Pos; } } #endregion // // Internal methods and properties // #if !SILVERLIGHT internal static bool IsPredefinedEntity(String n) { return(n == "lt" || n == "gt" || n == "amp" || n == "apos" || n == "quot"); } #endif internal XmlQualifiedName Name { get { return qname; } } internal String Url { get { return url;} set { url = value; isExternal = true;} } internal String Pubid { get { return pubid;} set { pubid = value;} } internal bool IsExternal { get { return isExternal; } set { isExternal = value; } } internal bool DeclaredInExternal { get { return isDeclaredInExternal; } set { isDeclaredInExternal = value; } } internal XmlQualifiedName NData { get { return ndata;} set { ndata = value;} } internal String Text { get { return text;} set { text = value; isExternal = false;} } internal int Line { get { return lineNumber;} set { lineNumber = value;} } internal int Pos { get { return linePosition;} set { linePosition = value;} } internal String BaseURI { get { return (baseURI == null) ? String.Empty : baseURI; } set { baseURI = value; } } internal bool ParsingInProgress { get { return parsingInProgress; } set { parsingInProgress = value; } } internal String DeclaredURI { get { return (declaredURI == null) ? String.Empty : declaredURI; } set { declaredURI = value; } } }; } // 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
- ManagementNamedValueCollection.cs
- Size3D.cs
- TextureBrush.cs
- CharUnicodeInfo.cs
- XsdBuildProvider.cs
- TableLayoutCellPaintEventArgs.cs
- SqlServices.cs
- Model3D.cs
- Color.cs
- Currency.cs
- QueryOutputWriter.cs
- HtmlTableCellCollection.cs
- HashCoreRequest.cs
- TextServicesCompartment.cs
- COM2FontConverter.cs
- ISAPIRuntime.cs
- ResolveDuplex11AsyncResult.cs
- ObjectHandle.cs
- DataSourceCache.cs
- ProgressBarBrushConverter.cs
- ForeignKeyConstraint.cs
- HiddenFieldPageStatePersister.cs
- Compiler.cs
- InternalUserCancelledException.cs
- WebPartVerbsEventArgs.cs
- CustomValidator.cs
- SendSecurityHeader.cs
- ReferenceEqualityComparer.cs
- BasicViewGenerator.cs
- RegexBoyerMoore.cs
- XmlComment.cs
- IncomingWebRequestContext.cs
- BinaryConverter.cs
- Knowncolors.cs
- CompiledELinqQueryState.cs
- iisPickupDirectory.cs
- ParsedAttributeCollection.cs
- DefaultExpressionVisitor.cs
- BulletDecorator.cs
- BlockExpression.cs
- XmlAtomicValue.cs
- ObjectSpanRewriter.cs
- DataGridHeaderBorder.cs
- CellParaClient.cs
- CryptoProvider.cs
- MaterializeFromAtom.cs
- AsyncWaitHandle.cs
- PageAction.cs
- UInt64.cs
- OdbcStatementHandle.cs
- GroupPartitionExpr.cs
- Typography.cs
- SoapExtensionReflector.cs
- CompositeTypefaceMetrics.cs
- SendActivityDesignerTheme.cs
- SmiTypedGetterSetter.cs
- SessionPageStateSection.cs
- MarkerProperties.cs
- ResourcePart.cs
- HtmlTableCell.cs
- BindingObserver.cs
- RangeValueProviderWrapper.cs
- SqlInternalConnectionTds.cs
- NodeLabelEditEvent.cs
- RawStylusInputReport.cs
- TrackingAnnotationCollection.cs
- DataGridViewCellCancelEventArgs.cs
- StorageRoot.cs
- ProvidePropertyAttribute.cs
- LinqDataView.cs
- Stylus.cs
- formatter.cs
- FileIOPermission.cs
- AttachInfo.cs
- CodeLinePragma.cs
- RichTextBoxAutomationPeer.cs
- FixedTextSelectionProcessor.cs
- NativeMethods.cs
- ErrorLog.cs
- HttpDictionary.cs
- NameValuePermission.cs
- SqlConnectionManager.cs
- ModelFactory.cs
- XPathExpr.cs
- XmlnsPrefixAttribute.cs
- GradientStop.cs
- DBBindings.cs
- WindowVisualStateTracker.cs
- WebZone.cs
- RolePrincipal.cs
- ScrollItemProviderWrapper.cs
- Tile.cs
- PolyBezierSegmentFigureLogic.cs
- SystemKeyConverter.cs
- SchemaDeclBase.cs
- PeerEndPoint.cs
- DateTimeOffsetAdapter.cs
- WsatServiceCertificate.cs
- UInt64Storage.cs
- SmtpSection.cs