Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- WhitespaceRuleReader.cs
- SlotInfo.cs
- MetafileHeaderWmf.cs
- CachedBitmap.cs
- PreservationFileWriter.cs
- xdrvalidator.cs
- BasePropertyDescriptor.cs
- CopyNamespacesAction.cs
- ContractTypeNameCollection.cs
- UIElementHelper.cs
- WindowsFormsSynchronizationContext.cs
- EntityClientCacheEntry.cs
- FactoryId.cs
- IxmlLineInfo.cs
- _LoggingObject.cs
- AssociationEndMember.cs
- RemoveStoryboard.cs
- AnimationLayer.cs
- TemplateDefinition.cs
- StrokeSerializer.cs
- DecimalAnimationUsingKeyFrames.cs
- AssemblyBuilderData.cs
- HttpWebResponse.cs
- SqlReorderer.cs
- Label.cs
- Int32Rect.cs
- LineInfo.cs
- GraphicsContext.cs
- BaseDataListDesigner.cs
- glyphs.cs
- MethodRental.cs
- AutomationProperty.cs
- InputBuffer.cs
- Size3D.cs
- HtmlInputRadioButton.cs
- EntityAdapter.cs
- XmlSchemaException.cs
- KeyNotFoundException.cs
- LogicalTreeHelper.cs
- ConvertersCollection.cs
- CachedBitmap.cs
- XmlWrappingReader.cs
- PrintDialogException.cs
- TableLayoutSettings.cs
- Int32Rect.cs
- _SpnDictionary.cs
- PrePostDescendentsWalker.cs
- SqlCacheDependencyDatabase.cs
- SHA256Managed.cs
- Buffer.cs
- EntityProviderServices.cs
- MatrixConverter.cs
- TemplateAction.cs
- Brush.cs
- SocketAddress.cs
- SafeFileMapViewHandle.cs
- Help.cs
- MulticastNotSupportedException.cs
- RuleSetReference.cs
- DurableInstancingOptions.cs
- C14NUtil.cs
- SplashScreenNativeMethods.cs
- DLinqAssociationProvider.cs
- TextEndOfSegment.cs
- QilName.cs
- AnimatedTypeHelpers.cs
- ConfigXmlText.cs
- SiteOfOriginContainer.cs
- ConstraintCollection.cs
- altserialization.cs
- FocusWithinProperty.cs
- ProjectionPruner.cs
- EnumType.cs
- ExtendedPropertyDescriptor.cs
- BitConverter.cs
- DrawingVisual.cs
- Figure.cs
- WhitespaceRuleLookup.cs
- CompilerGeneratedAttribute.cs
- TripleDESCryptoServiceProvider.cs
- PriorityRange.cs
- DataColumn.cs
- Nodes.cs
- Int32Collection.cs
- ScrollChangedEventArgs.cs
- IisTraceWebEventProvider.cs
- DataGridViewImageCell.cs
- AttributeCollection.cs
- CodeTypeMemberCollection.cs
- BufferBuilder.cs
- MobileUserControl.cs
- ToolZone.cs
- ClientType.cs
- SelectionItemProviderWrapper.cs
- X509Certificate.cs
- PeerResolverBindingElement.cs
- OLEDB_Enum.cs
- UIElementAutomationPeer.cs
- RangeValidator.cs
- TraceRecords.cs