Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / Compiler / CompilerError.cs / 1305376 / CompilerError.cs
//------------------------------------------------------------------------------ //// // //----------------------------------------------------------------------------- namespace System.CodeDom.Compiler { using System; using System.CodeDom; using System.Security.Permissions; using System.Globalization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [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. /// ///// // //----------------------------------------------------------------------------- namespace System.CodeDom.Compiler { using System; using System.CodeDom; using System.Security.Permissions; using System.Globalization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [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
- SpotLight.cs
- EventLogPermissionAttribute.cs
- DataGridLength.cs
- NullReferenceException.cs
- XmlMapping.cs
- CapiSymmetricAlgorithm.cs
- TypeInfo.cs
- WindowsAuthenticationModule.cs
- SoapAttributeOverrides.cs
- DescendantBaseQuery.cs
- DataServiceContext.cs
- PropertyRef.cs
- GridEntryCollection.cs
- Point3DCollectionValueSerializer.cs
- ClientUrlResolverWrapper.cs
- ResourcePermissionBaseEntry.cs
- EtwProvider.cs
- WebConfigurationHost.cs
- Object.cs
- ToolboxDataAttribute.cs
- DataBindingList.cs
- XPathNodeIterator.cs
- ClientCredentialsSecurityTokenManager.cs
- VScrollBar.cs
- SaveFileDialog.cs
- OpenFileDialog.cs
- Part.cs
- HuffCodec.cs
- DeviceContext2.cs
- Button.cs
- HtmlControl.cs
- XmlSchemaType.cs
- PassportAuthenticationModule.cs
- HttpRequestBase.cs
- VariableQuery.cs
- DataControlCommands.cs
- TreeNodeBindingCollection.cs
- GeneralTransform.cs
- BigInt.cs
- GradientStopCollection.cs
- NavigationWindowAutomationPeer.cs
- Line.cs
- RoutedEventValueSerializer.cs
- ExpressionCopier.cs
- ApplicationSecurityInfo.cs
- WaitHandleCannotBeOpenedException.cs
- MarkedHighlightComponent.cs
- ReadOnlyAttribute.cs
- SoapProtocolImporter.cs
- DataGridViewRowEventArgs.cs
- NumericUpDownAcceleration.cs
- ToolBar.cs
- HttpCapabilitiesEvaluator.cs
- FloatUtil.cs
- ObjectManager.cs
- EpmTargetPathSegment.cs
- RuntimeHandles.cs
- WindowsToolbar.cs
- ContentType.cs
- DesigntimeLicenseContext.cs
- BinaryHeap.cs
- PageThemeBuildProvider.cs
- XmlStringTable.cs
- CheckPair.cs
- ProviderException.cs
- PointCollectionConverter.cs
- LocalClientSecuritySettingsElement.cs
- ContainerAction.cs
- ViewStateModeByIdAttribute.cs
- TableHeaderCell.cs
- QueryUtil.cs
- ApplicationException.cs
- TraceHandlerErrorFormatter.cs
- EnterpriseServicesHelper.cs
- RelationshipConstraintValidator.cs
- ThemeDirectoryCompiler.cs
- XmlSignificantWhitespace.cs
- ColorMatrix.cs
- Glyph.cs
- FaultBookmark.cs
- HighlightVisual.cs
- MouseGestureValueSerializer.cs
- Padding.cs
- MSAAWinEventWrap.cs
- SafePEFileHandle.cs
- FullTextState.cs
- PageParserFilter.cs
- TabControlCancelEvent.cs
- DynamicRenderer.cs
- CellNormalizer.cs
- MemberInfoSerializationHolder.cs
- StyleReferenceConverter.cs
- PostBackOptions.cs
- DatePickerTextBox.cs
- UInt64.cs
- CaseInsensitiveComparer.cs
- HWStack.cs
- AsymmetricSignatureFormatter.cs
- FixedTextBuilder.cs
- NamedPipeAppDomainProtocolHandler.cs