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
- SimpleColumnProvider.cs
- DesignTimeDataBinding.cs
- HTTPNotFoundHandler.cs
- MailMessageEventArgs.cs
- InternalCache.cs
- ISessionStateStore.cs
- TextChange.cs
- EntryPointNotFoundException.cs
- SQLConvert.cs
- Compensate.cs
- Label.cs
- SiteMapPath.cs
- XmlAnyAttributeAttribute.cs
- SQLInt16.cs
- RelationshipSet.cs
- HostingEnvironmentException.cs
- WeakReferenceKey.cs
- COM2EnumConverter.cs
- DesignTimeParseData.cs
- DefaultShape.cs
- ScriptResourceHandler.cs
- ReversePositionQuery.cs
- EditorPartDesigner.cs
- DurableEnlistmentState.cs
- ExpressionConverter.cs
- ComboBoxAutomationPeer.cs
- VBIdentifierDesigner.xaml.cs
- listitem.cs
- BaseCollection.cs
- InputReport.cs
- FileDialog.cs
- BreakRecordTable.cs
- ComplexObject.cs
- IxmlLineInfo.cs
- DeferredSelectedIndexReference.cs
- HttpEncoder.cs
- GACMembershipCondition.cs
- HttpsChannelListener.cs
- SamlAuthorizationDecisionClaimResource.cs
- Command.cs
- Baml2006ReaderSettings.cs
- OSFeature.cs
- WebPartConnectionsEventArgs.cs
- AnimationException.cs
- RequestStatusBarUpdateEventArgs.cs
- LogSwitch.cs
- ObjectTag.cs
- LockCookie.cs
- ClientFormsAuthenticationMembershipProvider.cs
- BlockCollection.cs
- securestring.cs
- _SSPIWrapper.cs
- cookieexception.cs
- XpsS0ValidatingLoader.cs
- WriteableOnDemandStream.cs
- SafeNativeMethods.cs
- Substitution.cs
- OleDbPermission.cs
- XmlSubtreeReader.cs
- UdpTransportSettings.cs
- ExceptionHandler.cs
- EFTableProvider.cs
- X509Extension.cs
- DocumentGridPage.cs
- DynamicMetaObjectBinder.cs
- ArraySet.cs
- CultureInfoConverter.cs
- EnumMember.cs
- LocalizeDesigner.cs
- SharedPerformanceCounter.cs
- BindingContext.cs
- RequestQueue.cs
- _SSPISessionCache.cs
- PenContext.cs
- WebPartEditVerb.cs
- DataBoundControlHelper.cs
- KnownAssembliesSet.cs
- ManagementEventWatcher.cs
- SelectedDatesCollection.cs
- SchemaType.cs
- ParserContext.cs
- ColumnPropertiesGroup.cs
- CollectionContainer.cs
- BulletChrome.cs
- Parameter.cs
- Floater.cs
- SlotInfo.cs
- ProcessInputEventArgs.cs
- DataGridColumn.cs
- Constraint.cs
- DependencyProperty.cs
- SqlCacheDependency.cs
- CodeSnippetStatement.cs
- ConfigPathUtility.cs
- ResourcesBuildProvider.cs
- BasicExpressionVisitor.cs
- PropertyRecord.cs
- AssociationSetMetadata.cs
- AutoResetEvent.cs
- SecurityContextCookieSerializer.cs