Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / Compiler / CompilerError.cs / 1 / CompilerError.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.CodeDom.Compiler { using System; using System.CodeDom; using System.Security.Permissions; using System.Globalization; ////// [Serializable()] [PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")] public class CompilerError { private int line; private int column; private string errorNumber; private bool warning = false; private string errorText; private string fileName; ////// Represents a compiler error. /// ////// public CompilerError() { this.line = 0; this.column = 0; this.errorNumber = string.Empty; this.errorText = string.Empty; this.fileName = string.Empty; } ////// Initializes a new instance of ///. /// /// public CompilerError(string fileName, int line, int column, string errorNumber, string errorText) { this.line = line; this.column = column; this.errorNumber = errorNumber; this.errorText = errorText; this.fileName = fileName; } ////// Initializes a new instance of ///using the specified /// filename, line, column, error number and error text. /// /// public int Line { get { return line; } set { line = value; } } ////// Gets or sets the line number where the source of the error occurs. /// ////// public int Column { get { return column; } set { column = value; } } ////// Gets or sets the column number where the source of the error occurs. /// ////// public string ErrorNumber { get { return errorNumber; } set { errorNumber = value; } } ////// Gets or sets the error number. /// ////// public string ErrorText { get { return errorText; } set { errorText = value; } } ////// Gets or sets the text of the error message. /// ////// public bool IsWarning { get { return warning; } set { warning = value; } } ////// Gets or sets /// a value indicating whether the error is a warning. /// ////// public string FileName { get { return fileName; } set { fileName = value; } } ////// Gets or sets the filename of the source that caused the error. /// ////// public override string ToString() { if (FileName.Length > 0) { return string.Format(CultureInfo.InvariantCulture, "{0}({1},{2}) : {3} {4}: {5}", new object[] { FileName, Line, Column, IsWarning ? "warning" : "error", ErrorNumber, ErrorText}); } else return string.Format(CultureInfo.InvariantCulture, "{0} {1}: {2}", IsWarning ? "warning" : "error", ErrorNumber, ErrorText); } } }/// Overrides Object's ToString. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormViewInsertedEventArgs.cs
- DbConnectionInternal.cs
- CodeConditionStatement.cs
- HttpApplication.cs
- TextTreeObjectNode.cs
- ScrollBarAutomationPeer.cs
- ReachDocumentReferenceSerializerAsync.cs
- SignatureDescription.cs
- WebPart.cs
- EncodingTable.cs
- BamlLocalizabilityResolver.cs
- MemberDomainMap.cs
- PermissionListSet.cs
- ModelUIElement3D.cs
- XmlMapping.cs
- ShapeTypeface.cs
- ExpandedWrapper.cs
- EqualityComparer.cs
- PropertyInformationCollection.cs
- PrefixHandle.cs
- MetadataFile.cs
- Stack.cs
- String.cs
- BitmapDecoder.cs
- TraceLog.cs
- DirectionalLight.cs
- MultiAsyncResult.cs
- DataGridSortCommandEventArgs.cs
- HotSpotCollection.cs
- XmlDataSource.cs
- sqlnorm.cs
- WebCategoryAttribute.cs
- RadioButton.cs
- XmlSchemaSimpleTypeUnion.cs
- BookmarkResumptionRecord.cs
- WorkItem.cs
- ImageFormat.cs
- PathFigureCollection.cs
- ConstraintCollection.cs
- DataColumnCollection.cs
- ModelTreeManager.cs
- EventProxy.cs
- DesignTimeParseData.cs
- CultureMapper.cs
- WebBrowserEvent.cs
- PageParserFilter.cs
- httpstaticobjectscollection.cs
- TextEditorLists.cs
- AliasGenerator.cs
- ProfilePropertyMetadata.cs
- TextShapeableCharacters.cs
- EventManager.cs
- RC2.cs
- StoragePropertyMapping.cs
- XmlDownloadManager.cs
- HwndSubclass.cs
- ConnectionOrientedTransportChannelListener.cs
- CalendarDesigner.cs
- ContextBase.cs
- Metafile.cs
- Font.cs
- SafeCertificateContext.cs
- SafeArrayRankMismatchException.cs
- PeerNameRecordCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- DbDataSourceEnumerator.cs
- Point3DAnimationUsingKeyFrames.cs
- _ListenerRequestStream.cs
- PersonalizationProviderHelper.cs
- XmlSerializer.cs
- ScrollItemProviderWrapper.cs
- DataGridHelper.cs
- Symbol.cs
- BaseTemplateCodeDomTreeGenerator.cs
- xmlNames.cs
- LoginStatusDesigner.cs
- ToolStripRendererSwitcher.cs
- ParameterCollectionEditorForm.cs
- DataListItem.cs
- TraceContextEventArgs.cs
- CounterSetInstance.cs
- WebPartCloseVerb.cs
- MatrixCamera.cs
- MdImport.cs
- ImplicitInputBrush.cs
- PropertyMapper.cs
- SimpleApplicationHost.cs
- RtfToken.cs
- WebPartEditorCancelVerb.cs
- Base64Encoding.cs
- TagMapCollection.cs
- SocketAddress.cs
- WebContext.cs
- EntityDataSource.cs
- ProfileService.cs
- DoubleIndependentAnimationStorage.cs
- typedescriptorpermission.cs
- Registry.cs
- ComboBoxHelper.cs
- OdbcConnectionPoolProviderInfo.cs