Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- EntityViewContainer.cs
- X509ChainElement.cs
- ParserStreamGeometryContext.cs
- InertiaExpansionBehavior.cs
- FontInfo.cs
- ConfigurationSettings.cs
- KernelTypeValidation.cs
- StreamGeometry.cs
- RightsManagementErrorHandler.cs
- TransactionsSectionGroup.cs
- COM2Properties.cs
- ReadOnlyCollection.cs
- RegexCharClass.cs
- IdentitySection.cs
- DocumentEventArgs.cs
- Pens.cs
- HttpRequest.cs
- InstanceCreationEditor.cs
- EntitySqlException.cs
- JavaScriptSerializer.cs
- DrawListViewItemEventArgs.cs
- ViewGenerator.cs
- TablePattern.cs
- util.cs
- XmlDocumentSchema.cs
- HwndTarget.cs
- DependencyPropertyConverter.cs
- ProfilePropertySettingsCollection.cs
- AuthorizationRule.cs
- Pair.cs
- ToolTipAutomationPeer.cs
- SmtpLoginAuthenticationModule.cs
- SourceFilter.cs
- OleDbException.cs
- RequiredAttributeAttribute.cs
- FillErrorEventArgs.cs
- DataRowExtensions.cs
- ClosureBinding.cs
- SimpleFieldTemplateFactory.cs
- AddInAdapter.cs
- Walker.cs
- DesignerCatalogPartChrome.cs
- DataGridLength.cs
- XmlMembersMapping.cs
- XmlEventCache.cs
- StylusShape.cs
- Boolean.cs
- ErrorInfoXmlDocument.cs
- FaultHandlingFilter.cs
- InvokeProviderWrapper.cs
- WebBrowser.cs
- WindowsGraphicsWrapper.cs
- WindowPatternIdentifiers.cs
- MenuRenderer.cs
- FileLogRecordHeader.cs
- PerspectiveCamera.cs
- DescendantBaseQuery.cs
- AsyncMethodInvoker.cs
- WebPartEditVerb.cs
- CompositeKey.cs
- Vector.cs
- ReceiveReply.cs
- XmlChoiceIdentifierAttribute.cs
- TypedTableBaseExtensions.cs
- Random.cs
- HttpHandler.cs
- DesignerExtenders.cs
- TemplatePropertyEntry.cs
- SetterBase.cs
- RangeBaseAutomationPeer.cs
- SoapDocumentMethodAttribute.cs
- DataBoundLiteralControl.cs
- GridPattern.cs
- DBNull.cs
- EntityDataSourceEntitySetNameItem.cs
- ExpressionPrefixAttribute.cs
- ImageListStreamer.cs
- URLMembershipCondition.cs
- TextStore.cs
- CodeCatchClauseCollection.cs
- MessageSmuggler.cs
- CompressionTracing.cs
- BitConverter.cs
- PaperSource.cs
- RegexWorker.cs
- ArrayTypeMismatchException.cs
- RemoveStoryboard.cs
- CssTextWriter.cs
- EncodingFallbackAwareXmlTextWriter.cs
- AssemblyUtil.cs
- HtmlTernaryTree.cs
- ProviderSettingsCollection.cs
- WMIGenerator.cs
- RenameRuleObjectDialog.Designer.cs
- NavigateEvent.cs
- OperationDescription.cs
- UncommonField.cs
- ButtonBaseAutomationPeer.cs
- ColumnWidthChangingEvent.cs
- CounterCreationDataCollection.cs