Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides Object's ToString. /// ///// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Overrides Object's ToString. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartsSection.cs
- CodeDirectiveCollection.cs
- CapiSafeHandles.cs
- SelectedDatesCollection.cs
- TypeProvider.cs
- RootBuilder.cs
- _ConnectOverlappedAsyncResult.cs
- CursorConverter.cs
- ExtensionFile.cs
- DescendentsWalkerBase.cs
- FixedTextBuilder.cs
- PinnedBufferMemoryStream.cs
- DelegateHelpers.Generated.cs
- InputReportEventArgs.cs
- RecipientInfo.cs
- SingleConverter.cs
- MarkupProperty.cs
- documentsequencetextcontainer.cs
- SharedConnectionWorkflowTransactionService.cs
- CellTreeNode.cs
- Token.cs
- OleDbParameterCollection.cs
- LineProperties.cs
- KeyNotFoundException.cs
- MenuBase.cs
- Intellisense.cs
- PartitionedDataSource.cs
- ToolStripItem.cs
- ChangeBlockUndoRecord.cs
- TreeWalkHelper.cs
- FormsAuthenticationUser.cs
- BaseEntityWrapper.cs
- BoundingRectTracker.cs
- RuleRefElement.cs
- CodeNamespaceImportCollection.cs
- EmptyStringExpandableObjectConverter.cs
- ArraySegment.cs
- xamlnodes.cs
- ChildDocumentBlock.cs
- PrtCap_Base.cs
- XmlElement.cs
- PipeSecurity.cs
- ITreeGenerator.cs
- PrintDialog.cs
- DataServiceClientException.cs
- AuthenticateEventArgs.cs
- RadioButton.cs
- BulletedListEventArgs.cs
- FixedFindEngine.cs
- ICollection.cs
- Menu.cs
- CollaborationHelperFunctions.cs
- UInt64.cs
- ManipulationStartingEventArgs.cs
- RegistryConfigurationProvider.cs
- Receive.cs
- BooleanConverter.cs
- CodeExpressionCollection.cs
- AdCreatedEventArgs.cs
- DynamicObjectAccessor.cs
- Size3DValueSerializer.cs
- TableLayoutCellPaintEventArgs.cs
- Fault.cs
- SqlUdtInfo.cs
- MemberRelationshipService.cs
- NegationPusher.cs
- FileRecordSequenceCompletedAsyncResult.cs
- HandleRef.cs
- BufferedGraphics.cs
- SrgsOneOf.cs
- CookieHandler.cs
- AssemblyCache.cs
- UnSafeCharBuffer.cs
- SortAction.cs
- TextureBrush.cs
- WebPartVerbCollection.cs
- ReachBasicContext.cs
- ListControl.cs
- CultureSpecificStringDictionary.cs
- TypeResolvingOptionsAttribute.cs
- WorkflowApplicationEventArgs.cs
- DiscoveryEndpointElement.cs
- MetadataException.cs
- ToolstripProfessionalRenderer.cs
- DefaultHttpHandler.cs
- BinaryReader.cs
- DBCommandBuilder.cs
- WorkflowControlClient.cs
- ContourSegment.cs
- MasterPageCodeDomTreeGenerator.cs
- WorkflowViewManager.cs
- Point3DCollectionConverter.cs
- QilCloneVisitor.cs
- TextTreeExtractElementUndoUnit.cs
- TdsValueSetter.cs
- StoreItemCollection.cs
- ServerTooBusyException.cs
- MultiBinding.cs
- COM2IPerPropertyBrowsingHandler.cs
- ExternalException.cs